Singleton: Only One, Ever

When two parts of an app each make their own copy of something the whole app should share, such as the shop's settings, they quietly disagree; the Singleton pattern makes a class allow only one object and gives everyone the same one.

By

Updated

Cheat sheet: Singleton: Only One, Ever
Category
Data Structures
Level
Apprentice
Tags
Global State, OOP, Singleton Pattern