title: Can you tell if a C++ pointer has been destructed?
body: <p>I have a global singleton that is used by many objects in my program.  This is causing crashes when the program is shutting down - it is used in the destructors of some objects, after the singleton itself has been destructed by end-of-program.  Is there a portable way to tell if a pointer has had 'delete' called on it?  In my case, it looks like delete changes the value of the pointer to (void*)(-1), but I don't know if this is portable. </p>