• 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: copy and mutableCopy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copy and mutableCopy


  • Subject: Re: copy and mutableCopy
  • From: ChanMaxthon <email@hidden>
  • Date: Mon, 28 Apr 2014 01:50:40 +0800

What object are you talking about? NSData have -bytes method and others would require you drop to CF code (or probably impossible)

Check for methods with "return internal pointer" attribute or fast iteration protocols.

If you need fine tuned control over that you may need to drop to C or use GNUstep implementations of respective Foundation classes. (BTW GNUstep uses COW whenever possible)

Sent from my iPhone

> On Apr 27, 2014, at 5:00 PM, Dave <email@hidden> wrote:
>
> Hi All,
>
> A long time back, I remember reading something about the way in which copy and mutableCopy are implemented. I think basically it said that:
>
> someObject = [someOtherObject copy];
>
> or
>
> someObject = [someOtherObject mutableCopy];
>
> Wouldn’t necessarily allocate any extra data storage. I’ve been searching for it to refresh my memory, but I can’t see to find it anywhere. Does anyone know if this document or something like it exists somewhere?
>
> Thanks a lot
> Dave
>
>
> _______________________________________________
>
> 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

_______________________________________________

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


References: 
 >copy and mutableCopy (From: Dave <email@hidden>)

  • Prev by Date: Re: copy and mutableCopy
  • Next by Date: Re: copy and mutableCopy
  • Previous by thread: Re: copy and mutableCopy
  • Next by thread: Re: copy and mutableCopy
  • Index(es):
    • Date
    • Thread