• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Information about Singleton

 
Kumaran Sowrirajan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends
Can anyone tell me about the features and functionality of singleton onject?
Thanks and Regards
Kumaran.S
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Singleton is not an object but a Design Pattern. With this pattern, the constructor for a class is private and a special static method is provided to get an instance of the class. This method ensures that only one instance is created.
A typical use would be to ensure that all access to a particular system resource goes through a single point.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic