On Apr 20, 2009, at 8:01 PM, Steve Christensen wrote:
You need a call to [self dealloc] here, otherwise you leak an instance of the class if you can't load the image.personName = @"New name"; personAddr = @"New addrress"; personPhoto = [[NSImage alloc] initWithContentsOfFile: @"/Volumes/Working/cocoa/Play-NSTableView/Linea.jpg"]; if (personPhoto == nil) {
Small correction here: For a failure in -init, call [self release], not dealloc. You should never call dealloc directly except from dealloc itself to call [super dealloc].
-- Gwynne, Daughter of the Code "This whole world is an asylum for the incurable." _______________________________________________ Cocoa-dev mailing list ([email protected]) 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/archive%40mail-archive.com This email sent to [email protected]
