Singleton Design Pattern
Intent:
Allow creation of only one instance for a class and provide global access to it.
Thread Safety:
Meyers Singleton provides thread safety from two threads trying to initialize singleton instance simultaneously.
Use Cases:
- Logger
- Session Settings
Issues:
References:
- SINGLETON - THE ANTI-PATTERN!
- [Singleton Design Pattern]https://sourcemaking.com/design_patterns/singleton)
- Thread-Safe Initialization of a Singleton