Skip to content

Instantly share code, notes, and snippets.

@rcstr
Forked from GaryJones/gist:8430080
Last active January 28, 2019 05:14
Show Gist options
  • Save rcstr/cba95996308c837bebe75c01293d08e0 to your computer and use it in GitHub Desktop.
Save rcstr/cba95996308c837bebe75c01293d08e0 to your computer and use it in GitHub Desktop.
References for Why Not to Use Singleton Design Pattern

Once you've read all those, read everything abou Dependency Injection, how that helps with injecting mocks during unit testing, and therefore why Singletons are bad.

@iLenTheme
Copy link

I know all the drama they say that Singleton is anti-patron and the whole Show, But this is a technique that is used, can not be considered bad when it helps your Plugin or Software to be faster and consume less ram

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment