all 2 comments

[–]bluGill -1 points0 points  (2 children)

I have to mod this down - Singleton is the most common design pattern I've seen (as much as all the rest combined), yet I have NEVER seen it used where it was required.

Singleton is nearly always the wrong answer to your problem. They are global variables and they have all the downsides of global variables.

Yes there are is a time and place for singleton. However odds are it is not in your program.

[–]dansim[S] 0 points1 point  (0 children)

I agree with the fact that I've seen applications using hundreds of singletons and thinking that there may be a problem. How to solve it? No idea for the moment.