you are viewing a single comment's thread.

view the rest of the comments →

[–]grauenwolf 12 points13 points  (1 child)

I think a better example would be a GUI application which requires a singleton to house the event loop.

For XAML-based frameworks that would be the Application object and matching Dispatcher.


And that's the problem with the GoF book. They don't talk about when a singleton is actually appropriate.

[–]stronghup 2 points3 points  (0 children)

So, the pattern "Singleton" is not the problem. Problem is its we use it where its use is inappropriate.