Re: NSData question
Re: NSData question
- Subject: Re: NSData question
- From: "John C. Randolph" <email@hidden>
- Date: Mon, 15 Apr 2002 19:36:40 -0700
On Monday, April 15, 2002, at 07:30 PM, Jonathan Wight wrote:
Anyone know if an NSData object created with:
+ (id)dataWithBytesNoCopy:(void *)bytes length:(unsigned)length;
will try to free 'bytes' when it gets dealloc-ed?
Cheers in advance.
file://localhost/Developer/Documentation/Cocoa/Reference/Foundation/ObjC_classic/
Classes/NSData.html says:
Creates and returns a data object that holds length bytes from
the buffer bytes. The returned object takes ownership of the
bytes pointer and frees it on deallocation. Therefore, bytes
must point to a memory block allocated with malloc.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.