Singleton Pattern
Problem
Exactly one instance of a class is allowed - it is a "singleton." Objects need a global and single point of access.
Solution
Define a static method of the class that returns the singleton.
This is a lazy initialization.
Last updated
Was this helpful?