Question d’entretien chez Garmin

what is singleton class

Réponses aux questions d'entretien

Utilisateur anonyme

8 juin 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

Utilisateur anonyme

7 mars 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;)); };

Utilisateur anonyme

10 avr. 2010

I dont know...