IT lexicon › Programming › Singleton

Singleton

Programming På svenska → Updated: 2026-05-24

Design pattern: ensure a class has just one instance in the entire program.

Classics: database connection, config, logger. Criticised for hiding dependencies and making testing harder — many people now talk about DI instead of Singleton.

← Back to the lexicon