Quantcast
Viewing latest article 1
Browse Latest Browse All 4

Answer by Jesper for How does "delete" reclaim memory?

If the object that you delete has pointers to other objects or blocks of memory then no, those will not be automatically deleted if your object is deleted. You have to take care of that yourself; the appropriate place to do that is most likely in the destructor of the class of your object.

If you don't deallocate all memory properly then your program has a memory leak.


Viewing latest article 1
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>