Re: Checkboxes and NSBox titles
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