#pragma once template class Singleton { public: Singleton(void){} ~Singleton(void){} private: static T* m_pInstance; public: static T* Instance() { if( !m_pInstance ) m_pInstance = new T; return m_pInstance; } static VOID DestroyInstance() { if( m_pInstance ) delete m_pInstance; m_pInstance = NULL; } }; // ¸í½ÃÀûÀ¸·Î ÃʱâÈ­ ÇÏÁö¾Ê¾Æµµ 0ÀÌ´Ù template< class T > T* Singleton::m_pInstance = NULL;