Top "Delete-operator" questions

In the C++ programming language, the delete operator calls the destructor of the given argument, and returns memory allocated by new back to the heap.

delete vs delete[] operators in C++

What is the difference between delete and delete[] operators in C++?

c++ memory-management delete-operator
delete[] an array of objects

I have allocated and array of Objects Objects *array = new Objects[N]; How should I delete this array? Just delete[] …

c++ arrays new-operator delete-operator
delete vs delete[]

Possible Duplicate: ( POD )freeing memory : is delete[] equal to delete ? When I was taught C++, this was a long time …

c++ memory-management delete-operator
How do you 'realloc' in C++?

How can I realloc in C++? It seems to be missing from the language - there is new and delete …

c++ new-operator realloc delete-operator
What's the equivalent of new/delete of C++ in C?

What's the equivalent of new/delete of C++ in C? Or it's the same in C/C++?

c++ c new-operator delete-operator
overloading new/delete

I'm making a little memory leak finder in my program, but my way of overloading new and delete (and also …

c++ operator-overloading new-operator delete-operator
Deleting a dynamically allocated 2D array

So I'm used to memory management in C where free(pointer) will free up all space pointed to by pointer. …

c++ memory-management delete-operator
Is it still safe to delete nullptr in c++0x?

In c++03 it is pretty clear that deleting a null pointer has no effect. Indeed, it is explicitly stated in §5.3.5/2 …

c++ null language-lawyer delete-operator
Why doesn't delete set the pointer to NULL?

I always wondered why automatic setting of the pointer to NULL after delete is not part of the standard. If …

c++ memory-management delete-operator
Calling delete on variable allocated on the stack

Ignoring programming style and design, is it "safe" to call delete on a variable allocated on the stack? For example: …

c++ stack heap delete-operator