Fixed deallocation when views are deallocated after the window

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11215 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2001-10-22 17:50:07 +00:00
parent 955fd31056
commit af8758c499

View file

@ -548,6 +548,13 @@ static NSNotificationCenter *nc = nil;
_counterpart = 0;
RELEASE(mini);
}
/* Clean references to this window - important if some of the views
are not deallocated now */
[_wv viewWillMoveToWindow: nil];
/* NB: releasing the window view does not necessarily result in the
deallocation of the window's views ! - some of them might be
retained for some other reason by the programmer or by other
parts of the code */
TEST_RELEASE(_wv);
TEST_RELEASE(_fieldEditor);
TEST_RELEASE(_backgroundColor);