Skip to content

Files

Latest commit

d64e956 · May 10, 2021

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 10, 2021
May 10, 2021

Singleton

singleton

read more in wikipedia

In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to one "single" instance. This is useful when exactly one object is needed to coordinate actions across the system. The term comes from the mathematical concept of a singleton.

Critics consider the singleton to be an anti-pattern in that it is frequently used in scenarios where it is not beneficial, introduces unnecessary restrictions in situations where a sole instance of a class is not actually required, and introduces global state into an application.