Arguably, you'd be better off subclassing NSData directly to add the mutation
APIs that you actually need. That clears up any possible confusion about
methods which might affect the length of the data.
On 14 Dec 2012, at 00:13, Robert Monaghan wrote:
Thanks for the suggestion, Kevin!
I
Hi Everyone,
I have just run head long into an issue with NSMutableData and existing buffers.
I have the following code:
UInt8 *sourcebytes = [clImgEngine srcBuffer];
[self setData:[NSMutableData
dataWithBytesNoCopy:sourcebytes
NSMutableData currently ignores (and always has, to my knowledge) the no-copy
hint and always copies the bytes into an internal buffer in case something
tries to change the length of the NSMutableData.
It would not be too difficult to make a subclass of NSMutableData that doesn't
copy and
Thanks for the suggestion, Kevin!
I went ahead and created a really crude subclass of NSMutableData. It seems to
work for my situation.
Attached is the code, for posterity. (I am sure I won't be the only one working
around this.)
Any suggestions to make this a bit more Proper are welcome.
On Dec 13, 2012, at 4:13 PM, Robert Monaghan b...@gluetools.com wrote:
I went ahead and created a really crude subclass of NSMutableData. It seems
to work for my situation.
Attached is the code, for posterity. (I am sure I won't be the only one
working around this.)
Any suggestions to
On Dec 13, 2012, at 4:24 PM, Greg Parker gpar...@apple.com wrote:
On Dec 13, 2012, at 4:13 PM, Robert Monaghan b...@gluetools.com wrote:
I went ahead and created a really crude subclass of NSMutableData. It seems
to work for my situation.
Attached is the code, for posterity. (I am sure I
On Dec 13, 2012, at 4:28 PM, Kevin Perry kpe...@apple.com wrote:
On Dec 13, 2012, at 4:24 PM, Greg Parker gpar...@apple.com wrote:
On Dec 13, 2012, at 4:13 PM, Robert Monaghan b...@gluetools.com wrote:
I went ahead and created a really crude subclass of NSMutableData. It seems
to work
On Dec 13, 2012, at 7:28 PM, Kevin Perry kpe...@apple.com wrote:
On Dec 13, 2012, at 4:24 PM, Greg Parker gpar...@apple.com wrote:
On Dec 13, 2012, at 4:13 PM, Robert Monaghan b...@gluetools.com wrote:
I went ahead and created a really crude subclass of NSMutableData. It seems
to work for my