• 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: Checkboxes and NSBox titles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checkboxes and NSBox titles


  • Subject: Re: Checkboxes and NSBox titles
  • From: "John C. Randolph" <email@hidden>
  • Date: Tue, 12 Jun 2001 16:41:52 -0700

On Tuesday, June 12, 2001, at 04:39 PM, John Hvrnkvist wrote:


On Tuesday, June 12, 2001, at 11:42 PM, John C. Randolph wrote:

- (void) setTitleCell:(NSCell *) aCell
{
if (aCell && (_titleCell != aCell))
[_titleCell release];
[_aCell retain];
_titleCell = aCell;
}

aCell==_tileCell; would cause a memory leak, wouldn't it?

D'oh! you're right. that should be:

- (void) setTitleCell:(NSCell *) aCell
{
if (aCell && (_titleCell != aCell))
{
[_titleCell release];
[_aCell retain];
_titleCell = aCell;
}
}

So the whole thing is a NoOp if aCell == titleCell.

-jcr

"This is not a book to be tossed aside lightly. Rather, it should be hurled with great force." -Dorothy Parker


  • Follow-Ups:
    • Re: Checkboxes and NSBox titles
      • From: Fritz Anderson <email@hidden>
References: 
 >Re: Checkboxes and NSBox titles (From: John Hörnkvist <email@hidden>)

  • Prev by Date: Re: Curse you, PDF!
  • Next by Date: Re: Curse you, PDF!
  • Previous by thread: Re: Checkboxes and NSBox titles
  • Next by thread: Re: Checkboxes and NSBox titles
  • Index(es):
    • Date
    • Thread