The Singleton is one of the creational patterns catalogued in the 1994 “Design Patterns” book by Gamma, Helm, Johnson, and Vlissides. Its intent is to ensure that a class has only one instance and to provide a single, global point of access to that instance. A typical implementation makes the constructor private and exposes a class method that creates the instance on first use and returns the same instance on every later call.
Singletons are used when exactly one object must coordinate some shared resource or state, such as a single registry, configuration object, or connection manager. The pattern guarantees both that there is no more than one instance and that other code has a well-known way to reach it.
The Singleton has become the most criticized of the original patterns. Because it provides global access to shared state, it carries many of the same problems as a global variable: it can hide dependencies between parts of a program, make code harder to test in isolation, and create tight coupling to the single instance. For these reasons many developers treat Singleton as an anti-pattern to be used sparingly.
Despite the criticism, the pattern remains widely recognized, and its place in the original catalogue makes it a standard part of the shared vocabulary that design patterns provide. Its history is often cited as an example of how a documented pattern can be both genuinely useful in narrow cases and easily overused.