The singleton creational pattern is simple and often used. It’s actually used a bit too often so this episode will give you some caution and provide some ideas to modify this pattern when needed.
There are really just 3 parts that make a class a singleton:
This pattern is so simple that it’s used a bit too much. The main problem is that it’s actually little better than a global variable. It makes the single instance available throughout your program. For a large program, this can cause problems debugging because the singleton can be accessed and potentially modified from anywhere.
The singleton pattern is useful, just don’t overuse it. The podcast episode also gives you some additional tips for how you might want to modify this pattern.