SINGLETON
• Singleton design pattern is used when only one instance of an object is needed throughout the lifetime of an application
• The Singleton Class is instantiated at the time of first access and the same instance is used thereafter till the application quits
• Singleton Class can be used in various places where one would need a common repository of information that can be accessed from all objects in an application
• For example sometimes only a single database connection object or network connection object may be needed by the application
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment