The Singleton Pattern

  • Adam Freeman


I describe the singleton pattern in this chapter, which ensures that only one object of a given type exists in the application. This is one of the most commonly used design patterns because it solves problems that arise often, either because you need an object to represent a real-world resource or because you want to ensure that all activity of a certain kind—such as logging—is handled in a consistent way. Table 6-1 puts the singleton pattern in context.


Credit Card Number Data Corruption Global Constant Concurrency Problem Concurrency Issue 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Adam Freeman 2015

Authors and Affiliations

  • Adam Freeman
    • 1
  1. 1.ChicagoUnited States

Personalised recommendations