How are static objects managed when they are allocated with new? Where do these static object reside; in the heap or in the static memory?
I'm using a singleton as per the pattern described by the Gang of Four to implement a GameMap class, and I found it interesting the fact that the private object holding the sole class instance is allocated with new, but never explicitly deallocated with delete.
I confess I cannot see a way I could delete it explicitly. Certainly not in the class destructor. So it seems obvious (with my limited knowledge) that the language takes care of that for me.
But I'm still curious as to how this is done since C++ doesn't normally do this kind of resource management. And most particularly possible implications, if any, this might have on a singleton class that contains RAII-based data members.