Good case for Singletons?

后端 未结 10 1595
臣服心动
臣服心动 2021-01-05 07:24

I have an application that has several classes used for storing application-wide settings (locations of resources, user settings, and such). Right now these classes are just

10条回答
  •  离开以前
    2021-01-05 07:55

    Singleton will give you an object reference, that you can use all over your app... you will use singleton if you want objects and/or polymorphism...

提交回复
热议问题