Singleton

Design Pattern: Singleton

The singleton is a design pattern used when it is needed to have one and only one object of a certain class.

As the singleton instance can be accessed from anywhere in a system, this design pattern can be used to coordinate actions, or to replace global variables.

design_pattern_singleton