3 ms·
If you mean this: http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Named_Constructor http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Named_Const... , which is
by misterbee 15y ago
If you mean this: http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Named_Constructor http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Named_Const...
, which is called a Factory, in Java, then no.
A Named Constructor / Factory creates a new instance on demand. A mingleton hands out references to the same instance each time it is called.
- epidemian 15y agoYes, I was refering to that idiom. Thanks for the clarification.