Contents Up << >>

Freestore management

Does "delete p" delete the pointer "p", or the pointed-to-data, "*p"?
Can I "free()" pointers allocated with "new"? Can I "delete" pointers allocated with "malloc()"?
Why should I use "new" instead of trustworthy old malloc()?
Why doesn't C++ have a "realloc()" along with "new" and "delete"?
How do I allocate/unallocate an array of things?
What if I forget the "[]" when deleteing array allocated via new Fred[n]?
Is it legal (and moral) for a member function to say "delete this"?
How do I allocate multidimensional arrays using new?
Does C++ have arrays whose length can be specified at run-time?
How can I ensure objects of my class are always created via "new" rather than as locals or global/static objects?