delete-operator
New/delete[] and VirtualAlloc
#include <Windows.h> #include <iostream> using namespace std; int main(void) { unsigned char* pFoo = new unsigned char[1000];[详细]
2023-04-12 01:13 分类:问答Deleting char pointer array
I want todelete a char * array, which should be simple right? char * = new char[length]; then use delete[] char;?[详细]
2023-04-11 12:49 分类:问答Try-Catch and Delete[] issue
I\'m having a bit of a problem with a try-catch situation, here goes the code (it\'s pretty simple): struct Something[详细]
2023-04-09 18:14 分类:问答Something unclear with operator delete
I am new to C++ and I have something unclear: #include <iostream> using namespace std; double* foo(void)[详细]
2023-04-07 16:46 分类:问答Deleting an aliased pointer
Doing this: union{ int * integer; char * character; } u; u.integer = new in开发者_如何学Pythont; delete u.character;[详细]
2023-04-06 19:31 分类:问答Is there any way to get the length of an dynamically allocated array in C++? [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: Is there any way to determine the size of a C++ array programmatical开发者_如何学Cly? And if not, why?[详细]
2023-04-05 22:29 分类:问答Deleting objects in c++
I have a LinkedList with a Node that have a field: void* _data; Now, I want to delete this data, but i cant know if the data will be a primitive or an object that was dynamically allocated.[详细]
2023-04-05 10:43 分类:问答delete this ? what does it do?
Given the following : #include <iostream> using namespace std; class A { public: void func() {delete this;}[详细]
2023-03-31 19:59 分类:问答How can a delete[] operation crash while the destructor succeeds? (in C++)
I have a class Foo, which has a (simple) destructor. Some other class contains an array of Foo objects (called foolist), in the destructor of that class, I do:[详细]
2023-03-31 15:13 分类:问答Memory leak - release and delete
IFSUPCUTILSize* size = NULL; CoCreateInstance(CLSID_UTILSize, NULL, CLSCTX_INPROC_SERVER, IID_IFSUPCUTILSize,reinterpret_cast<void**>(&size));[详细]
2023-03-30 15:55 分类:问答