• 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: Jens Alfke <email@hidden>
  • Date: Wed, 23 May 2012 10:15:22 -0700

On May 23, 2012, at 8:26 AM, Andreas Grosam wrote:

> Is there an easy way to figure out the capacity of a NSMutableData object - that is the number of bytes that can be written to the data object without causing it to reallocate the internal buffer or invalidating the base pointer to the internal buffer?

I don't think so. You should always assume that any call to -setLength: will invalidate the -bytes/-mutableBytes pointer.

—Jens
_______________________________________________

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


References: 
 >NSMutableData capacity (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: NSDocument autosave doesn't show as edited
  • Next by Date: Strange behavior with App Sandbox and CoreData Document
  • Previous by thread: NSMutableData capacity
  • Next by thread: Re: NSMutableData capacity
  • Index(es):
    • Date
    • Thread