Free C++ class library of cryptographic schemes
Restricts the instantiation of a class to one static object without locks. More...
|Singleton (F objectFactory=F())|
|const T &||Ref (...) const|
|Return a reference to the inner Singleton object. More...|
Restricts the instantiation of a class to one static object without locks.
|T||the class or type|
|F||the object factory for T|
|instance||the initiali instance count|
This class safely initializes a static object in a multithreaded environment without using locks (for portability). Note that if two threads call Ref() at the same time, they may get back different references, and one object may end up being memory leaked. This is by design.
|const T & Singleton< T, F, instance >::Ref||(||...||)||const|