Open changxiangzhong opened 9 years ago
I think I need an example to understand exactly what you mean. Is this a question or just a statement? If the singleton is mutable and the state is critical to the app, it's probably either a bad design choice or it needs to be able to restore the state in some way?
I wasn't aware of that @changxiangzhong before, so good to know. Nevertheless I agree with @ealmdahl - "probably either a bad design choice". We shouldn't use singleton that way.
Static object could be recycled when the app is in the background at any time. If the states of the static object is changed. Such changing will be lost.
What do you think @Damian-Lopata @ealmdahl @sindrenm @jeantuffier