Re: faster deep copies?
Re: faster deep copies?
- Subject: Re: faster deep copies?
- From: Jerry Krinock <email@hidden>
- Date: Thu, 14 Feb 2013 09:18:23 -0800
I've taken the plunge and written a mutable deep copy method for NSObject in my applications.
So far, I've used it only to add interesting arbitrary objects to NSError userInfo dictionaries. Unliike Ken and Uli, I'd never thought about the circular references in object trees, but I ran into a different problem, which you should also watch out for, which is that descendant objects are not necessarily serializable, encodeable, or respond to -mutableCopy.
https://github.com/jerrykrinock/CategoriesObjC/blob/master/NSObject+DeepCopy.h
My next commit of that will have at least some warnings about circular references in object trees :)
_______________________________________________
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