Re: NSMutableData capacity
Re: NSMutableData capacity
- Subject: Re: NSMutableData capacity
- From: Thomas Davie <email@hidden>
- Date: Thu, 24 May 2012 07:42:30 +0100
On 24 May 2012, at 06:02, Jason Teagle wrote:
>>> +dataWithCapacity:some_capacity
>>
>> The docs note that this doesn't necessarily pre-allocate the given capacity.
>
> Which is exactly why I said, in the very same sentence, "to guarantee it has the capacity (but not necessarily allocated yet)".
I'm not sure what you're hoping to achieve from this. NSMutableData's capacity is not a hard and fast upper limit to how much data can be put in there; it's just a hint to the API for roughly how much space should be found for the data.
Bob
_______________________________________________
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