Re: ARC Extending Lifetime of Objects
Re: ARC Extending Lifetime of Objects
- Subject: Re: ARC Extending Lifetime of Objects
- From: Graham Cox <email@hidden>
- Date: Mon, 23 Jul 2012 23:22:01 +1000
On 23/07/2012, at 11:12 PM, Andreas Grosam wrote:
> Due to the lack of attributes attachable to properties in Objective-C language and a momento method (I already warned that I'll possibly digressing ;) ) I just use a deep copy for creating the momento.
Another solution is to use archiving to turn your object graph into a block of data. While this may sound not very high performance, it may be adequate - after all, if the purpose is to Undo or Cancel, the actual need to Undo or Cancel doesn't arise very often, so it's not like you have to perform thousands of these per second, and archiving is pretty fast if your object graph isn't ultra-complex.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden