The singleton pattern was part of the original Design Patterns collection. It makes sure that a class, which we call a singleton class, has only one instance. In other words, only one object of that class may ever be created during the program's life. Such a class must also provide global access to this instance.
You will notice that the pattern tells us nothing about how that one singleton instance should be destroyed. It also doesn't specify when the singleton instance should be created.
Whenever you ...