In this article,we will discuss
- Lazy Initialization in Singleton
- How to use Multi-threads in Singleton
- How to implement a Thread Safe singleton class
Please go through my previous article to learn about singleton design pattern.
Lazy Initialization in Singleton : GetInstance Property is responsible for the Singleton Instance creation. Singleton object is not instantiated until and unless GetInstance is invoked. Hence, there is a delay in instance creation till the GetInstance is accessed. This Delay in Instance creation is called Lazy Initialization. Continue reading “Thread Safety in Singleton”