mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 14:10:47 +00:00
Fix a problem where owner, firstResponder and application
were put in the list of top-level objects, creating a retain-cycle. Fix a problem where view and window controllers did not release their top-level objects as expected. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36127 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
562a722ac1
commit
b40571e9c5
4 changed files with 31 additions and 5 deletions
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSException.h>
|
||||
|
@ -129,6 +130,10 @@
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
// View Controllers are expect to release their own top-level objects
|
||||
// https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html
|
||||
[_top_level_objects makeObjectsPerformSelector:@selector(release)];
|
||||
|
||||
[self setWindow: nil];
|
||||
RELEASE(_window_nib_name);
|
||||
RELEASE(_window_nib_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue