Monthly Archives: July 2014

Singleton Design Pattern – A Creational Design Pattern

singleton-design-pattern

singleton design pattern

As the name suggest, Singleton means ‘Single Instance’.  As it is a creational design pattern so this design pattern provides the solution to create only one object (instance) of a class throughout the application’s life time.That means you can restrict the creation of an object of a given class by providing a static member function to create only one object for that class.

Creational Design Patterns

singleton-design-pattern

singleton design pattern

This design pattern provides the way to create an object of a class as per your project requirement. It means you can control the creation and life cycle of an object in your application.  As we have already discussed about different creational design patterns in my previous post, lets have a recall about  the creational patterns as below and then we will discuss different types of creational patterns in this post later.