ios - Making a single copy of a singleton -


a design question:

i have singleton (in objective-c doesn't matter)

the singleton class (object) data structure many classes access, , single (hence - singleton)

now want add ability undo - saving snapshot of state of object - can go it.

what need break singleton-ness of object (need 1 copy of it). not allow me share conveniently between classes.

ideas?

"the singleton class (object) data structure many classes access, , single"

i think easier make singleton object have collection of data structure. create copies of data structure instead of copies of singleton.


Comments

Popular posts from this blog

How can we post XML strings along with text strings in iOS -

How to run C# code using mono without Xamarin in Android? -

c# - cefsharp app remember password option -