• 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: Problem in displaying image in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Problem in displaying image in NSTableView (From: cocoa learner <email@hidden>)
 >Re: Problem in displaying image in NSTableView (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Problem in displaying image in NSTableView
  • Next by Date: Re: OpenGL
  • Previous by thread: Re: Problem in displaying image in NSTableView
  • Next by thread: simulating nested classes in objective-c
  • Index(es):
    • Date
    • Thread