Singleton Pattern (One of a Kind Objects)
Definition
The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it.
We use the singleton pattern whenever we want everyone to use the same global resource, for example: thread pools, connection pools...
kirollossamy.hashnode.dev5 min read