Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSData dataWithContentsOfFile - freeWhenDone:NO ?



On Fri, Oct 31, 2008 at 3:02 PM, <email@hidden> wrote:

>
> I'm using [NSData dataWithContentsOfFile] to load an AIFF file.  I was
> wondering if there is a way to make it freeWhenDone:NO so I can delete the
> NSData object and keep the bytes.  Audio files can be pretty big so I was
> hoping to avoid having to copy the bytes if possible.


There's no easy method that I can see. That said, why not just keep the
object? Given the size of the audio data, the handful of additional bytes
used by the object's ivars seems pretty insignificant.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >NSData dataWithContentsOfFile - freeWhenDone:NO ? (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.