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.

Comments

Popular posts from this blog

Multiton

How do you deal with making sure your use of new technology is correct and free from code-smells, security issues, etc.? - Hashnode

Review - TFS/VSTS - Great Product, Ideal for Small Development Shops