March 2002
Intermediate to advanced
496 pages
8h 51m
English
Unique objects are not uncommon. In fact, most objects in an application bear a unique responsibility; why would you create two objects with identical responsibilities? Similarly, nearly every class has a unique role. Why would you develop the same class twice? On the other hand, singleton classes—classes that allow only a single instance—are relatively rare. The fact that an object or a class is unique does not imply that the SINGLETON pattern is at work. Consider the classes in Figure 8.1.

|
Read now
Unlock full access