<<< Singleton Collaboration with Clients     Index     Singleton Sample >>>

20. Singleton Implementation Considerations


  1. If instance of the class does not exist, the new instance is created.

  2. If an instance already exists, Singleton simply returns a reference to that object.

  3. The singleton pattern must be carefully constructed in multi-threaded applications:

     


<<< Singleton Collaboration with Clients     Index     Singleton Sample >>>