ãã«ãã¹ã¬ãããèæ ®ãã¦Singletonãå®è£ ããã¨ããã¢ã¯ã»ã¹ãã度ã«TCriticalSectionã使ã£ã¦ãªãã¸ã§ã¯ãã®ä¸èº«ãä¿è·ãã¦ãããªãã¨ãããªãã®ããªã»ã»ã»ã class CSingleton { private: CSingleton(){} CSingleton(const CSingleton& obj) {} virtual ~CSingleton(){} public: static CSingleton& getInstance(); static void release(); private: static CSingleton* s_pInstance; }; CSingleton& CSingleton::getInstance() { if (s_pInstance == NULL) { // ã·ã³ã°ã«ãã³ãªãã¸ã§ã¯ãã®åæå // TCritical
{{#tags}}- {{label}}
{{/tags}}