Re: faster deep copies?
Re: faster deep copies?
- Subject: Re: faster deep copies?
- From: James Maxwell <email@hidden>
- Date: Thu, 14 Feb 2013 20:28:40 -0800
Well, yes, that's a good question.
But I spent a good deal of time trying to find a way around it and couldn't. However, in the meantime I discovered that by using a home-spun -deepCopy method on just a couple of classes I was able to solve my mutation problem, without resorting to the wholesale NSKeyedArchiver approach of grabbing the entire object graph.
So, problem solved. If I ever feel inclined to discover a deeper fix I will, but it won't be any time soon!
J.
On 2013-02-14, at 4:01 PM, Graham Cox <email@hidden> wrote:
>
> On 14/02/2013, at 1:07 PM, James Maxwell <email@hidden> wrote:
>
>> I've run into a situation where I really need a deep copy of an object.
>
>
>
> My question would be: are you really sure?
>
> Yes, there are times you need a deep copy, but surprisingly few. Often you can redesign your code not to need one....
>
> --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