I'm so tired with all the dozens of singleton pattern tutorials poping up every day, it's like there is a world-wide never-ending contest of the worst singleton pattern introduction ever. But hey, if there is a contest, ain't I supposed to contribute, and optionally TO WIN?!
So here is it, and what's better than a Single(ton) image to describe the pattern:

Note also that just like in every other useless tutorial, I won't mention the double-check locking issue or why the pattern should be avoided now that IoC is widely spread.
Recent comments