Skip to content

Glossary: Software Design Patterns in C++

Singleton

Also written: singleton pattern

A class that allows only one instance and hands everyone that same instance. In C++ it is usually a function-local static, but changeable shared values become global state.

Where the book teaches it

Related terms

Function-local staticGlobal state