摘要:
意图:保证一个类仅有一个实例,并提供一个访问它的全局访问点。class Singleton{public: static Singleton* Instance() { if(_instance == NULL) { // ScopedLock lock; if(_instance == NULL) { _instance = new Singleton(); } } return _instance; }protected: ... 阅读全文
posted @ 2013-05-04 21:41
Leung文
阅读(126)
评论(0)
推荐(0)

浙公网安备 33010602011771号