• 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 capacity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSMutableData capacity
      • From: Jason Teagle <email@hidden>
References: 
 >NSMutableData capacity (From: Andreas Grosam <email@hidden>)
 >Re: NSMutableData capacity (From: Jason Teagle <email@hidden>)
 >Re: NSMutableData capacity (From: Wade Tregaskis <email@hidden>)
 >Re: NSMutableData capacity (From: Jason Teagle <email@hidden>)

  • Prev by Date: Re: NSMutableData capacity
  • Next by Date: Re: NSMutableData capacity
  • Previous by thread: Re: NSMutableData capacity
  • Next by thread: Re: NSMutableData capacity
  • Index(es):
    • Date
    • Thread