
Design Patterns Part 1 – You Create Me!
Coding Blocks
00:00
Singleton
There's several different ways within C sharp and Java that you can create a singleton. John Skeet has written up an article where he talks about, I think it was like a half dozen of the different implementations for it. There's static constructor or singletons, there's double check locking singletons. You want multiple singletons? You're only going to ever be able to inherit from one. So if you had a singleton, right, and you sealed it, so why would you allow for multi- Inheritance? Because what’s the true type of class when you seal it? Is your child not inheriting from it? Or is this kind of
Transcript
Play full episode