Re: dataWithBytesNoCopy:length:freeWhenDone

2011-10-09 Thread silverdr
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

Re: dataWithBytesNoCopy:length:freeWhenDone

2011-10-09 Thread silverdr
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

dataWithBytesNoCopy:length:freeWhenDone

2011-10-08 Thread silverdr
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