Singleton: Porovnání verzí

Smazaný obsah Přidaný obsah
Bez shrnutí editace
Řádek 159:
}
}
</source>
 
<source>
 
class Singleton {
private:
static Singleton *instance;
public:
static Singleton *GetInstance()
{
if (instance == NULL) {
instance = new Singleton();
}
return instance;
}
}
 
</source>