OpenSceneGraph
OpenSceneGraph copied to clipboard
Delay destruction of DeleteHandler
DeleteHandler must outlive the the first DeleteHandlerPointer. ApplicationUsage from ApplicationUsage::instance() was created by ApplicationUsage.cpp module constructor and the unstecified order related to module constructor of Referenced.cpp which creates DeleteHandlerPointer. Then they were deleted in reverse order.
Now as soon we create the first Referenced, like ApplicationUsage, DeleteHandlerPointer will be created as well.
Alternative solution is to never delete the last DeleteHandler.