template <class T>
class CSingleton
{
public:
static T& GetInstance();
protected:
private:
CSingleton();
~CSingleton();
};
template<class T>
CSingleton<T>::CSingleton()
{
}
template<class T>
T& CSingleton<T>::GetInstance()
{static T Instance;
return Instance;
}
template<class T>
CSingleton<T>::~CSingleton()
{
}
Sunday, October 26, 2008
Refactoring Singleton Class
작성자: scor7910 시간 9:28 PM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment