View RSS Feed

Design Patterns

Singleton Pattern Implementation

Rate this Entry
by , 03-09-2012 at 06:39 PM (614 Views)
A static member is involved in Singleton class, a static public method and a private constructor while doing implementation. This makes a reference to be returned to the static member.

A getInstance operation is being defined by the Singleton pattern which gives exposure to the unique instance. This unique instance is accessible by the clients. Responsibility of the getInstance() is to create class unique instance if it is not built uptill now and also to return the instance.

Submit "Singleton Pattern Implementation" to Facebook Submit "Singleton Pattern Implementation" to Digg Submit "Singleton Pattern Implementation" to del.icio.us Submit "Singleton Pattern Implementation" to StumbleUpon Submit "Singleton Pattern Implementation" to Google

Comments