<<< Implementing singletons | Index | Extended singleton code >>> |
Additional problems to consider:
We want to be able to substitute new kinds of singleton without changing client code.
Clients will expect the same interface.
Possibility of deciding what kind of singleton to create based on external specification,
such as environment variable.
Solution:
use inheritance and registration.
<<< Implementing singletons | Index | Extended singleton code >>> |