Unsolved Class singleton help
Hi i am trying to learn about this class and searching a lot of data. But i didnt get nice examples. So please if someone know one example or some site to learn about this class will be very helpful for me. Sorry a lot!
@Jeronimo Singleton is not a class, it is a pattern. There is a plenty of different techniques of realization, but, in general, typical singleton consists of a static field and a private constructor. And a public method - accessor. A set of these features guarantees that there will be only one instance of a class in memory at every moment of time. Quick googling gives a bunch of examples and articles. This, for example.