10 #ifndef __SINGLETON_HPP_
11 #define __SINGLETON_HPP_
19 #define SINGLETON(T) \
20 private: static T* m_pInstance; \
22 static T* getInstance(){ \
23 if(m_pInstance == NULL) return m_pInstance = new T(); \
26 static void releaseInstance(){ \
27 if(m_pInstance != NULL) delete m_pInstance; \
31 #define INIT_SINGLETON(T) \
32 T* T::m_pInstance = NULL;