I read the answer about static vs singelton, however, i specifically look for concrete examples of when should i use a static class instead of a singelton. As it seems at the moment, singelton should always be used.
Thanks.
I read the answer about static vs singelton, however, i specifically look for concrete examples of when should i use a static class instead of a singelton. As it seems at the moment, singelton should always be used.
Thanks.
I suggest you to read the book "Design patterns - Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides (http://en.wikipedia.org/wiki/Design_Patterns).
Among the differences, a singleton can be be lazily constructed, requiring no memory or resources until needed.