Re: Problem in displaying image in NSTableView
Re: Problem in displaying image in NSTableView
- Subject: Re: Problem in displaying image in NSTableView
- From: Gwynne Raskind <email@hidden>
- Date: Mon, 20 Apr 2009 20:09:01 -0400
On Apr 20, 2009, at 8:01 PM, Steve Christensen wrote:
personName = @"New name";
personAddr = @"New addrress";
personPhoto = [[NSImage alloc] initWithContentsOfFile:
@"/Volumes/Working/cocoa/Play-NSTableView/Linea.jpg"];
if (personPhoto == nil)
{
You need a call to [self dealloc] here, otherwise you leak an
instance of the class if you can't load the image.
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@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