<<< Prototype Sample | Index | Singleton Collaboration with Clients >>> |
Problems to solve:
Only one instance of an object is needed throughout the lifetime of an application.
Single instance to be created at the time of first access.
Singletons often control access to resources such as
Database connections (e.g. single license for one connection to the database.)
Network socket connections (e.g. restricting client app to only one connection at any time.)
Clients need global point of access to the Singleton's instance.
<<< Prototype Sample | Index | Singleton Collaboration with Clients >>> |