The Singleton Pattern's Gotchas

For years, the only software design pattern that I thought I really understood was the Singleton Pattern. I mean, how much more simple can you get than a pattern that is used to "ensure that a class has only one instance, and provides a global point of access to it"?

What I did not realize, until reading Head First Design Patterns, is that you need to watch out for singletons when it comes to multi-threaded environments. If you don't have a copy of Head First Design Patterns, you can see what I mean by checking out Jon Skeet's article Implementing the Singelton Pattern.

Published Monday, December 15, 2008 7:56 AM by Tod Birdsall
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Picture of Tod Birdsall

Welcome!

This is the personal website of Tod Birdsall, a programmer, business analyst, and gamer. Not necessarily in that order. Learn more...

Subscribe

Be notified of my latest posts. Subscribe to my blog.