Singleton pattern
Summary
Singleton is a creational pattern that ensures a class only has one instance and provides a global point of access to it.
(Image by refactoring.guru)
Problems
There are times when your application only needs to use one instance of a cla...
minhhnn.hashnode.dev3 min read