• 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: Partially release NSMutableData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Partially release NSMutableData


  • Subject: Re: Partially release NSMutableData
  • From: Graham Cox <email@hidden>
  • Date: Thu, 5 Aug 2010 17:59:59 +1000

On 04/08/2010, at 11:02 PM, Marcus Karlsson wrote:

> 3. Use a single NSMutableData object. Once enough data has arrived move the data that may have been appended later to the beginning and adjust the capacity.
>
> Any opinions on which one to use or ideas on even better ones?


This one's easiest. Use -replaceBytesInRange:withBytes:length:

This works if the replacement bytes are nil, so acting to delete a range of bytes. The range would be from 0 to however much you've processed so far.

--Graham




_______________________________________________

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: 
 >Partially release NSMutableData (From: Marcus Karlsson <email@hidden>)

  • Prev by Date: MKMapView
  • Next by Date: Re: CGImage, CIImage and NSImage
  • Previous by thread: Partially release NSMutableData
  • Next by thread: Re: Partially release NSMutableData
  • Index(es):
    • Date
    • Thread