Memory management question.
Memory management question.
- Subject: Memory management question.
- From: Scott Andrew <email@hidden>
- Date: Fri, 11 Feb 2005 17:36:47 -0800
This is a newbie question....
I have a panel that I create using the following code.
-(IBAction)showBonusPane:(id)sender
{
FTBonusPanelController* panel = [[FTBonusPanelController alloc]
initWithParent:[self window]];
[NSApp beginSheet:[panel window]
modalForWindow:[self window]
modalDelegate:self
didEndSelector: @selector(sheetEnded:returnCode:context:)
contextInfo:NULL];
//[NSApp runModalForWindow:[panel window] relativeToWindow:[self
window]];
}
My FTBonusPaneController has a handler for its "Close" push button that
calls endPanel and order out.
Is this OK code to write?
- (void)sheetEnded:(NSWindow*)sheet returnCode:(int)returnCode
context:(void*)contextInfo
{
[[sheet windowController] release];
}
My thinking is isn't the windowController count at least 2? I have a
reference that I haven't released and the window has a reference?
Thanks for the help,
Scott Andrew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden