All pastes #790751 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-20 16:09 UTC
rendered paste body
class Settings
{
	private:
	    Settings() { };
    	static Settings* s;
	public:
    	static Settings* getInstance();
};

Settings* Settings::s = 0;

Settings* Settings::getInstance() {
	
	if (!s)
	{
		s = new Settings;
	}
	
    return s;
}