Sollicitatievraag bij Garmin

what is singleton class

Antwoorden op sollicitatievragen

Anoniem

8 jun 2010

A class whose number of instances that can be instantiated is limited to one is called a singleton class. Thus, at any given time only one instance can exist, no more. for more info, check http://www.codeguru.com/forum/showthread.php?t=344782

1

Anoniem

7 mrt 2012

A class where the constructor is private. class myclass; myclass *myclass:: _instance = NULL; class myclass { private: myclass(); public: static myclass *_instance; myclass *instance() { if (_instance) return _instance; else return ((_instance = new myclass;)); };

Anoniem

10 apr 2010

I dont know...