Chapter 16. More Design Patterns
In this chapter, we present design patterns from each of the three categories: creational, structural, and behavioral.
By using creational patterns to manage object creation, we gain flexibility that makes it possible to choose or change the kinds of objects created or used at runtime, and also to manage object deletion automatically. Especially in large software systems, managing the creation of objects is important for flexibility in program design, maintaining a separation between layers of code and ensuring that objects are properly deleted when they are no longer needed.
In C++, a factory is a program component, ...