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%2BDeepCopy.h

My next commit of that will have at least some warnings about circular 
references in object trees :)


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to