Workaround for broken destruction of static member variables in MSVC. More...
#include <singleton_bugfix.h>
Static Public Member Functions | |
static void | add_destructor (std::function< void()> destructor) |
static void | deinitialize () |
Workaround for broken destruction of static member variables in MSVC.
The C++ runtime in Visual Studio 2013 and 2015 deinitializes the threading library prematurely. This causes std::thread and other standard library classes to not work in static member variables.
This SingletonBugfix and the Singleton template allows an application to deinitialize all static member variables wrapped by the Singleton template by calling SingletonBugfix::deinitialize()
|
static |
Referenced by uicore::Singleton< T >::Singleton().
|
static |