K
ken
template<class T>
class cSingleton : public T
{
private:
cSingleton() {};
public:
static T* GetInstance()
{
static cSingleton instance;
return &instance;
}
};
I wrote this code in gcc 3.3 with xcode.
But, 'static cSingleton instance;' doesn't work well.
I think, it's bug of gcc 3.3
Is there any other way to make singleton in gcc 3.3?
class cSingleton : public T
{
private:
cSingleton() {};
public:
static T* GetInstance()
{
static cSingleton instance;
return &instance;
}
};
I wrote this code in gcc 3.3 with xcode.
But, 'static cSingleton instance;' doesn't work well.
I think, it's bug of gcc 3.3
Is there any other way to make singleton in gcc 3.3?