• 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: Opposite of windowDidLoad
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opposite of windowDidLoad


  • Subject: Re: Opposite of windowDidLoad
  • From: Charles Srstka <email@hidden>
  • Date: Thu, 12 Jan 2017 13:41:59 -0600

> On Jan 12, 2017, at 12:53 PM, Quincey Morris <email@hidden> wrote:
>
> windowWillClose is an acceptable place to tear down the binding only if (a) the thing bound, and the thing bound to, still exist, and (b) there is no chance that the window will be re-opened. Both of those are typically true, but it does depend on what you’re doing.
>
> Window dealloc/deinit is also a possible time, but again you need to be sure that the relevant objects still exist, probably by keeping strong references to them in the window controller itself (and again it depends on what you’re doing).

The nice thing about windowWillClose for this is that if the binding ends up retaining your window controller somehow, you don’t end up with a retain cycle.

Charles

_______________________________________________

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


References: 
 >Opposite of windowDidLoad (From: Daryle Walker <email@hidden>)
 >Re: Opposite of windowDidLoad (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Opposite of windowDidLoad
  • Next by Date: Re: Refreshing Cocoa Bindings
  • Previous by thread: Re: Opposite of windowDidLoad
  • Next by thread: NSNetServiceBrowser vs. mDNSResponder
  • Index(es):
    • Date
    • Thread