Re: NSKeyValueBindingCreation Protocol
Re: NSKeyValueBindingCreation Protocol
- Subject: Re: NSKeyValueBindingCreation Protocol
- From: Quincey Morris <email@hidden>
- Date: Sat, 28 Apr 2012 20:43:34 -0700
On Apr 28, 2012, at 15:52 , Richard Somers wrote:
> Actually now that I have done a little more research it appears that my question regarding programmatically calling -unbind: when the window closes is not related to which memory model I am using: GC, ARC or traditional RR.
>
> GC is not recommended any more and ARC only deals with retain/release. ARC does not remove observers and thus would be unable to -unbind:. So this question would apply equally to ARC and manual RR.
It might. If reference counting is involved, the implicit behavior (i.e. the behavior of your app if you don't explicitly 'unbind:') might depend on the presence or absence of retain cycles between various view-related objects, and the pattern of strong references *might* be different for ARC and RR. Some private frameworks things kick in at dealloc time, but then the question is whether the relevant object ever gets to dealloc.
Anyway, Kyle gave you one possible intervention point: 'windowWillClose:'. Others include: 'viewWill/DidMoveToSuperview:', 'viewWill/DidMoveToWindow:', 'willRemoveSubview:', and 'dealloc'.
_______________________________________________
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