Generic Singleton Base Class 출처 : http://vallista.tistory.com/entry/1-Singleton-Pattern-in-C #pragma once //http://vallista.tistory.com/entry/1-Singleton-Pattern-in-C template < typename T > class Singleton { protected: Singleton() { } virtual ~Singleton() { } public: static T * GetInstance() { if (m_pInstance == nullptr) { m_pInstance = new T; } return m_pInstance; } static void DestoryInstance() { if (m_pInstance) { delet.. 더보기 이전 1 2 3 4 5 6 ··· 363 다음