template<typename T, bool DESTRUCTONEXIT = false>
class UT_Singleton< T, DESTRUCTONEXIT >
This is the same as UT_SingletonWithLock, except referencing an existing lock in get(), instead of holding its own. This can be useful for avoiding having many locks as member variables when using UT_Singleton for pointer member variables that are allocated on-demand, or if another lock would need to be acquired in order to run new T().
Definition at line 132 of file UT_Singleton.h.
template<typename T, bool DESTRUCTONEXIT = false>
template<class LOCK >
NOTE: Even though unsafeSet locks, it is still unsafe, because other threads may have called get(), gotten a valid pointer, and be using it when unsafeSet destructs it.
Definition at line 160 of file UT_Singleton.h.