Subj : Memory Management,. C Vs C++ To : borland.public.cpp.borlandcpp From : "Rob C. " Date : Sun Nov 16 2003 10:59 am Correct me if I’m wrong. In straight C - You have an array of 5000 pointers to int, [ int *ArrayName[5000]; ], which takes up . . . what, 5000?, 6000? bytes of memory. Each pointer/sub represents a node , [ say, ArrayName[sub] = (int *) malloc( sizeof( int ) ); ]. Okay, so now, when you’re all done with the array of pointers, you can free-up the 5000 nodes and recapture that much memory, but the 5000?, 6000? bytes used by the array are still in use and thus still inaccessible. But now in C++ - You have the same array of 5000 pointers to int. Each pointer/sub represents a node. This time, however, you declare the array to be a member of an object. Like before, when you’re all done with the array of pointers, you free-up the 5000 nodes and recapture that much memory, but then simply delete the object, thus recapturing the additional 5000?, 6000? bytes used by the array, for other purposes. Is this right? [ Would you even have to “free” or “delete” the nodes, or would that be automatically done for you when you deleted the object? ] .