Adds more criticism to Singleton pattern.
This commit is contained in:
@ -40,6 +40,8 @@ Use the Singleton pattern when
|
||||
|
||||
* Violates Single Responsibility Principle (SRP) by controlling their own creation and lifecycle.
|
||||
* Encourages using a global shared instance which prevents an object and resources used by this object from being deallocated.
|
||||
* Creates tightly coupled code that is difficult to test.
|
||||
* Makes it almost impossible to subclass a Singleton.
|
||||
|
||||
## Credits
|
||||
|
||||
|
Reference in New Issue
Block a user