On 2011-10-09, at 05:50, Ken Thomases wrote:
I'd guess that, with the 'NO' parameter, NSMutableData copies the data
anyway.
This is actually documented. In the Binary Data Programming Guide, in the
article Working With Binary Data[1], it says:
However, if you create an NSData object
On 2011-10-09, at 05:05, Quincey Morris wrote:
What am I doing wrong? Shouldn't the instance created using
dataWithBytesNoCopy:length:freeWhenDone simply hold the same bytes as
the originally provided ones?
Presumably you're using 'dataWithBytesNoCopy:length:freeWhenDone:NO', since
On Oct 9, 2011, at 05:44 , silve...@wfmh.org.pl wrote:
But what I tried to achieve was to do it somewhat more OO, although sharing
the payload between various instances seems to be contradicting it ;-)
Not at all. Sharing the payload is neither a problem nor wrong, but trying to
take a
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
On Oct 8, 2011, at 14:31 , silve...@wfmh.org.pl wrote:
What am I doing wrong? Shouldn't the instance created using
dataWithBytesNoCopy:length:freeWhenDone simply hold the same bytes as
the originally provided ones?
Presumably you're using 'dataWithBytesNoCopy:length:freeWhenDone:NO', since
On Oct 8, 2011, at 10:05 PM, Quincey Morris wrote:
On Oct 8, 2011, at 14:31 , silve...@wfmh.org.pl wrote:
What am I doing wrong? Shouldn't the instance created using
dataWithBytesNoCopy:length:freeWhenDone simply hold the same bytes as
the originally provided ones?
I'd guess