• Illustrates how a factory can control the number of instances of an object that can ever exist, using the Singleton pattern.
• Describes the key features of the Singleton pattern.
• Introduces a variant to the Singleton called the Double-Checked Locking pattern.
• Describes some of my experiences using the Singleton pattern in practice.
The Singleton pattern and the Double-Checked Locking pattern are very simple and very common. Both are used to ensure that only one object of a particular class is instantiated. The distinction ...