mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 00:20:49 +00:00
Remove the delegate from the notification center in -dealloc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14531 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3be0c5db02
commit
90bbe7b1e8
4 changed files with 25 additions and 0 deletions
|
@ -643,6 +643,13 @@ static NSNotificationCenter *nc = nil;
|
|||
[GSServerForWindow(self) termwindow: _windowNum];
|
||||
NSMapRemove(windowmaps, (void*)_windowNum);
|
||||
}
|
||||
|
||||
if (_delegate != nil)
|
||||
{
|
||||
[nc removeObserver: _delegate name: nil object: self];
|
||||
_delegate = nil;
|
||||
}
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue