delete-operator
Removing falsies from JavaScript object
So I write a short function to remove members from an object that have falsy values: for (var key in object) {[详细]
2023-01-08 13:20 分类:问答Double free coruption
I have a class call grid. The class holds two 2d char arrays for storing a grid... The class has two functions for creating the memory for the grid and releasing the memory for the grid.[详细]
2023-01-08 03:59 分类:问答Why doesn't delete destroy anything?
I\'m playing a little with memory dynamic allocation, but I don\'t get a point. When allocating some memory with the new statement, I\'m supposed to be able to destroy the memory the pointer points to[详细]
2023-01-07 17:07 分类:问答Calling delete on two pointers to the same object
I\'m having a problem with a couple of event handler classes I\'m trying to write. Basically, the idea is to have an event handler class for each logical group of objects. In most cases, the events ar[详细]
2023-01-06 22:20 分类:问答Is "delete this" allowed in C++?
Is it allowed to delete this; if the delete-statement is the last statement that will be executed on that instance of the class? Of course I\'m sure that the object represented by the this-pointer is[详细]
2023-01-05 11:17 分类:问答C++ delete operator confusion [duplicate]
This question already has answers here: Closed 12 years ago. Possible Duplicate: ( POD )freeing memory : is delete[] equal to delete ?[详细]
2023-01-05 08:09 分类:问答Deleting user-defined vectors - C++
I have 2 classes, say A & B. Class B has a destructor of its own. Within class A, I have a vector of pointers to objects of class B. The vector is as follows:[详细]
2023-01-04 12:32 分类:问答Deleting a element from a vector of pointers in C++
I remember hearing that the following code is not C++ compliant and was hoping someone with much more C++ legalese than me would be able to confirm or deny it.[详细]
2023-01-04 04:53 分类:问答C equivalent of C++ delete[] (char *)
What is the C equivalent of C++ delete[] (char *) foo->bar; Edit: I\'m converting some C++ code to ANSI C. And it had:[详细]
2023-01-02 08:21 分类:问答C++ new & delete and functions
This is a bit unclear to me... So,if I have a function: char *test(int ran){ 开发者_如何转开发char *ret = new char[ran];[详细]
2023-01-01 21:38 分类:问答