Helper base class for a late-initialized static variable, implementing the double-checked locking pattern correctly. More...
#include <instance.hxx>
Static Public Member Functions | |
| static T & | get () |
| Gets the static. | |
Helper base class for a late-initialized static variable, implementing the double-checked locking pattern correctly.
struct MyStatic : public rtl::StaticWithInit<MyType, MyStatic> { MyType operator () () { ... return MyType( ... ); } }; ... MyType & rStatic = MyStatic::get(); ...
| T | variable's type |
| InitData | initializer functor class |
| Unique | Implementation trick to make the inner static holder unique, using the outer class (the one that derives from this base class). Default is InitData (common practice). |
| Data | Initializer functor's return type. Default is T (common practice). |
|
inlinestatic |
Gets the static.
Mutual exclusion is performed using the osl global mutex.