Why use singleton instead of static class?

Posted by Jouke van der Maas on Stack Overflow See other posts from Stack Overflow or by Jouke van der Maas
Published on 2010-06-03T20:40:53Z Indexed on 2010/06/03 20:54 UTC
Read the original article Hit count: 205

When would a singleton actually be easier or better than a static class? It seems to me creating a singleton is just extra effort that's not actually needed, but I'm sure there is a good reason. Otherwise, they wouldn't be used, obviously.

© Stack Overflow or respective owner

Related posts about design-patterns

Related posts about class