Wednesday, June 29, 2011

Singleton Class in C++

class SingletonClass
{
private:
static bool SingletonIsstanceFlag;
static SingletonClass *single;
SingletonClass()
{
//private constructor

}
public:
static SingletonClass* getInstance();
void method();
~SingletonClass()
{
SingletonIsstanceFlag = false;
}
};

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

Windows 11 26H2: A More Refined Windows

  Windows 11 26H2: A More Refined Windows Windows 11 26H2 , the 2026 Update, is less about completely reinventing Windows and more about mak...