All About Singleton Pattern

added by Jinal Desai
7/20/2013 10:10:11 AM


The Single Pattern is the simplest design pattern. Many times it’s important to have only one instance for a particular class, for example we need to provide configuration manager for all the configurations of our application. But, we need to restrict instantiation of configuration manager class to only one. So only one instance of configuration manager will serve all the requests for configuration of our application. To better understand the scenario following is pseudo code.