Re: [NSMutableData resetDataRangeTo:(NSRange)range];
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