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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -