• 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: NSTableView and check boxes (for the hundredth time)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView and check boxes (for the hundredth time)


  • Subject: Re: NSTableView and check boxes (for the hundredth time)
  • From: Brent Gulanowski <email@hidden>
  • Date: Thu, 3 Oct 2002 15:46:59 -0400

On Thursday, October 3, 2002, at 09:03 AM, Vladimir Pilipyuk wrote:

NSButtonCell *protoCell;

protoCell=[[NSButtonCell alloc] init];
[protoCell setButtonType:NSSwitchButton];
[protoCell setImagePosition:NSImageOnly];
[protoCell setTitle:@""];
[checkboxColumn setDataCell:protoCell];

The protoCell should be released here. It is now retained by checkboxColumn.

I'll save Ondra the trouble by adding that you should autorelease immediately upon init, avoiding the danger of memory leak due to uncaught exception which might be raised in between separated init and release messages.

(protoCell = [[[NSButtonCell alloc] init] autorelease]; )

--
Brent Gulanowski email@hidden

I bought some batteries... but they weren't included... so I had to buy them again. - Stephen Wright
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: NSTableView and check boxes (for the hundredth time)
      • From: j o a r <email@hidden>
References: 
 >Re: NSTableView and check boxes (for the hundredth time) (From: Vladimir Pilipyuk <email@hidden>)

  • Prev by Date: NSUIElement
  • Next by Date: Re: NSTableView and check boxes (for the hundredth time)
  • Previous by thread: Re: NSTableView and check boxes (for the hundredth time)
  • Next by thread: Re: NSTableView and check boxes (for the hundredth time)
  • Index(es):
    • Date
    • Thread