If you are using a decent OS, it will not deallocate memory immediately because you might want it back a moment later so it's keeping it for you. When something else requests a large block of memory, the allocator will deallocate the chunk from your process. If you want to make sure the object is deleted, you can place some debug statement in its constructor or use tools such as valgrind to monitor the memory.
Bookmarks