Singleton (Update)


I recently came across a new way of implementing the Singleton pattern, detailed in this article. The article details, (1) the use of the volatile keyword, and (2) a new simpler way of implementing a Singleton by using the Lazy<T> class, something that was not available when I first wrote the section on the Singleton.

Popular posts from this blog

Multiton

Decorator Pattern