<<< Creation patterns | Index | Implementing singletons >>> |
Problem:
Need a single instance of some class for use by many modules (similar to a global variable)
Lifetime of this instance is for the entire program.
May want to extend this by subclassing later.
Want to do that without changing the client code.
Solution:
use static members.
<<< Creation patterns | Index | Implementing singletons >>> |