Re: Guidance for learner
Re: Guidance for learner
- Subject: Re: Guidance for learner
- From: Brian Smith <email@hidden>
- Date: Tue, 26 Jun 2007 15:50:57 -0600
I believe this,
On Jun 26, 2007, at 4:57 AM, Alan Smith wrote:
NSData *data = [[NSData alloc] initWithContentsOfFile:
filePath];
[files addObject: data];
will retain the NSData object twice so it should be,
NSData *data = [NSData dataWithContentsOfFile: filePath];
[files addObject: data];
so you get an autoreleased NSData objects which would be released
properly when the files array is released.
Brian
_______________________________________________
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:
This email sent to email@hidden