Re: Ugly bug in Foundation, beware!
Re: Ugly bug in Foundation, beware!
- Subject: Re: Ugly bug in Foundation, beware!
- From: Glenn Andreas <email@hidden>
- Date: Thu, 3 Jun 2004 08:40:47 -0500
At 3:05 PM +0200 6/3/04, Ondra Cada wrote:
>
Hi all,
>
>
just bumped into this: mutable arrays do *NOT* deep copy upon receiving
>
-copy
Where does it say that -copy is suppose to do a deep copy?
From the NSCopying protocol:
>
The NSCopying protocol declares a method for providing functional
>
copies of an object. The exact meaning of "copy" can vary from class
>
to class, but a copy must be a functionally independent object with
>
values identical to the original at the time the copy was made.
Shallow copy seems to meet that criteria.
Deep copy would probably not even be practical for collection classes
since they can contain objects that don't support the copying
protocol.
--
Glenn Andreas email@hidden
mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.