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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to