Re: Setting NSObjectController's to file's owner
Re: Setting NSObjectController's to file's owner
- Subject: Re: Setting NSObjectController's to file's owner
- From: Ken Thomases <email@hidden>
- Date: Thu, 15 May 2008 03:36:21 -0500
On May 15, 2008, at 2:21 AM, André Pang wrote:
I have a nib file containing an NSObjectController. The
NSObjectController's content is set to the File's Owner proxy
object, and this creates a retain cycle. (The file's owner never
gets deallocated because the object controller retains it, and the
object controller never gets deallocated because the file's owner
retains it as an IBOutlet.)
One of the nice things that NSWindowController and NSViewController do
for you is, if they are a nib's owner, they resolve this retain cycle
for you.
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden