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:
Jonathan Gillaspie 2013-02-13 20:18:52 +00:00
parent 562a722ac1
commit b40571e9c5
4 changed files with 31 additions and 5 deletions

View file

@ -27,6 +27,7 @@
#import <Foundation/NSBundle.h>
#import <Foundation/NSString.h>
#import <Foundation/NSArray.h>
#import "AppKit/NSKeyValueBinding.h"
#import "AppKit/NSNib.h"
#import "AppKit/NSViewController.h"
@ -49,6 +50,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
[_topLevelObjects makeObjectsPerformSelector:@selector(release)];
DESTROY(_nibName);
DESTROY(_nibBundle);
DESTROY(_representedObject);