What, when why Singleton design pattern?

I am reading about Singleton design pattern and I don’t understand why we should use it, a lot of people will say, oh to create a single instance of that class in order to save resources, and it’s fine I get it, then we should use it for every class? Because from my understating we use it only on classes that their data not change, se they upload it one time in the memory and share them across the code, am I right? At this point will be useless to instantiate multiple objects which return the same unchangeable data? Right?

submitted by /u/Propeus
[link] [comments]

Leave a Reply