Set window delegate to nil before we disappear

There are places where we iterate through the delegates of NSApp’s ordered windows. Since the window may stay around longer than it’s (NSWindowController) delegate, we should be sure to set NSWindow’s delegate property to nil.
This commit is contained in:
Allan Odgaard
2013-01-03 06:38:20 +01:00
parent ecc25b38d4
commit 934ec2de5c
2 changed files with 6 additions and 0 deletions

View File

@@ -112,4 +112,9 @@ static std::multimap<oak::uuid_t, HTMLOutputWindowController*> Windows;
[alert beginSheetModalForWindow:self.window modalDelegate:self didEndSelector:@selector(closeWarningDidEnd:returnCode:contextInfo:) contextInfo:NULL];
return NO;
}
- (void)dealloc
{
self.window.delegate = nil;
}
@end