• 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
dataWithBytesNoCopy:length:freeWhenDone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dataWithBytesNoCopy:length:freeWhenDone


  • Subject: dataWithBytesNoCopy:length:freeWhenDone
  • From: email@hidden
  • Date: Sat, 08 Oct 2011 23:31:24 +0200

Hello group,

I have a large
NSMutableData, which I divide into some logical structure elements creating
new NSMutableData instances, which are supposed to hold a subset
of bytes the large instance holds. Yet I want all the manipulations
done on the bytes of the "small" instances to be reflected in the
"large" one. I tried creating the "small" instances using

dataWithBytesNoCopy:length:freeWhenDone:

but it doesn't seem to work as expected - mutableBytes of the newly
created instance point elsewhere than the original mutableBytes.

What am I doing wrong? Shouldn't the instance created using
dataWithBytesNoCopy:length:freeWhenDone simply hold the same bytes as
the originally provided ones?

Hoping for some help. Thanks in advance.
_______________________________________________

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: dataWithBytesNoCopy:length:freeWhenDone
      • From: Quincey Morris <email@hidden>
  • Prev by Date: NSTableView - Drag/Drop not working
  • Next by Date: Re: NSPrintInfo and NSPageLayout
  • Previous by thread: Re: NSTableView - Drag/Drop not working
  • Next by thread: Re: dataWithBytesNoCopy:length:freeWhenDone
  • Index(es):
    • Date
    • Thread