Re: NSMutableData capacity
Re: NSMutableData capacity
- Subject: Re: NSMutableData capacity
- From: Jason Teagle <email@hidden>
- Date: Thu, 24 May 2012 07:51:51 +0100
- Organization: Organised Bytes Software
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.
(The point - with setLength: - was to pre-allocate the memory so that
the OP would get that out of the way at a known point in time, and would
know when the next allocation would be required so it wouldn't suddenly
allocate memory at what might be a crucial point in time when speed and
smoothness were of the essence. If they track the size of data being set
in and do the capacity / allocations themselves, they *should* (in
theory) be able to guarantee no unexpected memory juggling.)
--
Jason Teagle
_______________________________________________
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