Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

You might find this helpful: http://stackoverflow.com/questions/2765060/stateless-singleton-vs-static-methods/2765251#2765251https://stackoverflow.com/questions/2765060/stateless-singleton-vs-static-methods/2765251#2765251

To summarize:

  • the advantage of an actual singleton over a static class is, a singleton can implement interfaces
  • the point of a singleton is not to grant global access to a value, but to control instantiation of a type.

greetz
back2dos

You might find this helpful: http://stackoverflow.com/questions/2765060/stateless-singleton-vs-static-methods/2765251#2765251

To summarize:

  • the advantage of an actual singleton over a static class is, a singleton can implement interfaces
  • the point of a singleton is not to grant global access to a value, but to control instantiation of a type.

greetz
back2dos

You might find this helpful: https://stackoverflow.com/questions/2765060/stateless-singleton-vs-static-methods/2765251#2765251

To summarize:

  • the advantage of an actual singleton over a static class is, a singleton can implement interfaces
  • the point of a singleton is not to grant global access to a value, but to control instantiation of a type.

greetz
back2dos

Source Link
back2dos
  • 30.1k
  • 3
  • 76
  • 114

You might find this helpful: http://stackoverflow.com/questions/2765060/stateless-singleton-vs-static-methods/2765251#2765251

To summarize:

  • the advantage of an actual singleton over a static class is, a singleton can implement interfaces
  • the point of a singleton is not to grant global access to a value, but to control instantiation of a type.

greetz
back2dos