4 ms·
Isn't a "mingleton" the same as a named constructor, or am I missing something?
by epidemian 15y ago
Isn't a "mingleton" the same as a named constructor, or am I missing something?
- misterbee 15y agoIf 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.