SimpleLib

Singleton Class

CSingleton provides the instance pointer for a singleton class. To use CSingleton, simply derive your singleton class from CSingleton:

class CMySingletonObject : public CSingleton<CMySingletonObject>
{
	....
};

CMySingletonObject g_Instance;

You can then retrieve the instance pointer using the GetInstance() method:

CMySingletonObject::GetInstance()->DoSomething();

CSingleton provides performs various asserts that only one instance is ever created

Thats about it!