1 #ifndef SCX_SINGLETON_HPP
2 #define SCX_SINGLETON_HPP
14 pthread_once(&control
, &Singleton::Init
);
25 static pthread_once_t control
;
26 static T
* ptrInstance
;
30 pthread_once_t Singleton
<T
>::control
= PTHREAD_ONCE_INIT
;
33 T
* Singleton
<T
>::ptrInstance
= NULL
;