OpenSceneGraph icon indicating copy to clipboard operation
OpenSceneGraph copied to clipboard

Delay destruction of DeleteHandler

Open vitalybuka opened this issue 3 years ago • 0 comments

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.

vitalybuka avatar Apr 21 '22 22:04 vitalybuka