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:
Nicola Pero 2002-09-24 01:33:09 +00:00
parent 33da6f7f1c
commit 3c735f0c53
4 changed files with 25 additions and 0 deletions

View file

@ -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];
}