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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to