Skip to main content

Singleton

Make sure a class has only one instance, and provide a global access to it.

Example :

  • A single window manager
  • a single point of access to a database
  • only one device driver (instantiate more than once unnecessary overhead, inconsistent behavior)

Singleton%207104ae55054247d5ab2e9859018739c7/Untitled.png