• 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: [NSMutableData resetDataRangeTo:(NSRange)range];
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSMutableData resetDataRangeTo:(NSRange)range];


  • Subject: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • From: "Gary L. Wade" <email@hidden>
  • Date: Mon, 14 Jul 2014 12:57:55 -0700

The reason you can't do exactly what you're asking is because there may be other owners of the immutable object. Since NSMutableData is a subclass of NSData, you should ask yourself where you're creating the object and try creating it from the start as mutable, and also if there are owners of the object that would be okay with that difference.
--
Gary L. Wade (Sent from my iPad)
http://www.garywade.com/

> On Jul 14, 2014, at 12:15 PM, Carl Hoefs <email@hidden> wrote:
>
> Okay, 1 last question on this. Is there a way to promote-in-place an NSData object into an NSMutableData object?  -becomeMutable or some such? I'm trying to avoid copying megabytes of data/sec if it's avoidable.

_______________________________________________

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: 
 >[NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Matt Gough <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Mike Abdullah <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Ben Kennedy <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Jens Alfke <email@hidden>)
 >Re: [NSMutableData resetDataRangeTo:(NSRange)range]; (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Next by Date: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Previous by thread: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Next by thread: Re: [NSMutableData resetDataRangeTo:(NSRange)range];
  • Index(es):
    • Date
    • Thread