• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ObjectController preventing WindowController from releasing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjectController preventing WindowController from releasing


  • Subject: Re: ObjectController preventing WindowController from releasing
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 07 Nov 2011 10:38:41 -0600

On Nov 7, 2011, at 10:09 AM, Jonathan Taylor wrote:

> I have a window and window controller which in the absence of an object controller work fine, and both are deallocated when the window is closed. If I add an ObjectController to the NIB and bind its "Content Object" to "File's Owner.self" then the window no longer closes properly.

What is the File's Owner?  Is the window controller the file's owner?  Is the window controller the one loading the NIB (rather than, say, using NSBundle or NSNib directly)?  NSWindowController has some built-in functionality to break retain cycles for binding through File's Owner when and only when it is the File's Owner and loads the NIB.

What would you sensibly bind to the File's Owner itself, rather than one of its properties?  In other words, what is bound to or through the object controller?

> Is there something important that I should be doing here? Should I somehow be releasing the object controller, or indicating to it that it is no longer required?

It shouldn't be required, but, as a last resort, you can set the object controller's content to nil in -windowWillClose:.

Regards,
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

  • Follow-Ups:
    • Re: ObjectController preventing WindowController from releasing
      • From: Jonathan Taylor <email@hidden>
References: 
 >ObjectController preventing window from closing (From: Jonathan Taylor <email@hidden>)
 >ObjectController preventing WindowController from releasing (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: UITextField and UIGestureRecognizers
  • Next by Date: Re: ObjectController preventing WindowController from releasing
  • Previous by thread: ObjectController preventing WindowController from releasing
  • Next by thread: Re: ObjectController preventing WindowController from releasing
  • Index(es):
    • Date
    • Thread