Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added a proxyController outlet so you can set up an NSObjectControlle…

…r to bind through. When you call releaseTopLevelObjects, that controller's reference to the UKNibOwner is set to NIL, thus breaking out of the circular retain that bindings put us into.

git-svn-id: svn://witness.is-a-geek.org/svn@72 378c4bed-2673-4746-83ae-d22ddc8c5b7c
  • Loading branch information...
commit 1a03e3eaf2b28e60aefb5f7d58d3d7dcbf858008 1 parent 6b785b9
authored
3  UKNibOwner.h
@@ -32,7 +32,8 @@
32 32
 
33 33
 @interface UKNibOwner : NSResponder
34 34
 {
35  
-    NSMutableArray*     topLevelObjects;
  35
+    NSMutableArray*					topLevelObjects;
  36
+	IBOutlet NSObjectController*	proxyController;	// Hook this up to this object and back, and bind to the object controller. -releaseTopLevelObjects will do a setContents:nil on it to release all bindings correctly.
36 37
 }
37 38
 
38 39
 -(id)	init;
1  UKNibOwner.m
@@ -80,6 +80,7 @@ -(void)	dealloc
80 80
 
81 81
 -(void)	releaseTopLevelObjects
82 82
 {
  83
+	[proxyController setContent: nil];
83 84
 	[topLevelObjects release];
84 85
 	topLevelObjects = nil;
85 86
 }

0 notes on commit 1a03e3e

Please sign in to comment.
Something went wrong with that request. Please try again.