• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mutableCopy of array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mutableCopy of array


  • Subject: Re: mutableCopy of array
  • From: Gerard Iglesias <email@hidden>
  • Date: Tue, 15 Apr 2003 08:48:40 +0200

On Tuesday, April 15, 2003, at 02:27 AM, Steve Woodward wrote:

Yep, it's in there...

mutableCopy

- (id)mutableCopy

Convenience method for classes that adopt the NSMutableCopying
protocol. This method simply invokes the NSMutableCopying protocol
method mutableCopyWithZone: with the zone as nil. An exception is
raised if there is no implementation for mutableCopyWithZone:.

Ok, ok ... :)

If your array is filled by copy-able object you will see that they are copied also, it is something I didn't expect, I expect only that my array is copied as a mutable array and filled with the same pointers as in the original.... I expect a shallow copy not a semi deep one.

And I just verified this morning on the Mac at home and it makes a shallow copy now, that is what I expected.

But working on GNUstep also, I discovered that the present version make a semi-deep copy ???? And people at work said me that it was the way OpenStep worked in the past... ;)

Something to discuss on the GNUstep list.

Ok, now everything is OK under OSX on this point.

Very nice...

Best regards

Gerard
_______________________________________________
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.

References: 
 >Re: mutableCopy of array (From: Steve Woodward <email@hidden>)

  • Prev by Date: Re: true next responder
  • Next by Date: Re: OSType
  • Previous by thread: Re: mutableCopy of array
  • Next by thread: Drag & drop
  • Index(es):
    • Date
    • Thread