dataWithBytesNoCopy:length:freeWhenDone
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