• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSData question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSData question


  • Subject: Re: NSData question
  • From: Jonathan Wight <email@hidden>
  • Date: Mon, 15 Apr 2002 21:46:32 -0500

On 04/15/2002 21:36, "John C. Randolph" <email@hidden> wrote:

> 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_class
> ic/
> 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.

That's odd because mine (Cocoa Browser) reads: "Creates and returns a data
object that holds length bytes from the buffer bytes." and I have the latest
Developer CD installed...

But
http://developer.apple.com/techpubs/macosx/Cocoa/Reference/Foundation/ObjC_c
lassic/Classes/NSData.html#//apple_ref/occ/clm/NSData/dataWithBytesNoCopy:le
ngth: agrees with you.

Guess I need to update my local docs.

Thanks.

Jon.
_______________________________________________
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.

References: 
 >Re: NSData question (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: NSData question
  • Next by Date: Redrawing & erasing a path
  • Previous by thread: Re: NSData question
  • Next by thread: Re: NSData question
  • Index(es):
    • Date
    • Thread