/singleton_pattern_dart

Singleton is a creational design pattern that ensures that a class has only one instance and provides an easy global access to that instance.

Primary LanguageC++

singleton_pattern_dart

Singleton is a creational design pattern that ensures that a class has only one instance and provides an easy global access to that instance.

The main tenets of this pattern are:

  • Ensure that the class has only a single instance.
  • Provide easy global access to this instance.
  • Control how it is instantiated.
  • Any critical region must be entered serially.