On Fri, 9 Jul 2010 13:38:36 -0700, Jerry Krinock said: >> mmalc has some comments on unbinding here: >> <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html#unbinding> > >I wonder if mmalc saw any advantage to using -viewWillMoveToSuperview: >vs. -viewWillMoveToWindow: for unbinding/unobserving? It seems like >they'd both do about the same thing.
My memory is fuzzy, but it might have had to do with GC. IIRC, viewWillMoveToWindow:nil is sent to a view during a window's finalization... ah, here's what I was thinking of: <http://www.mail-archive.com/[email protected]/msg36330.html> Anyway, I previously used a DTS incident and talked to people at WWDC about all this. The conclusion was: on 10.5, an NSView's finalize is always called on the main thread, so you can safely call removeObserver:forKeyPath: to undo KVO started previously. In 10.6, kvo is done with weak referencing, so you don't have anything you need to do. >> Note that if you use NSView's fullscreen method ... > >Arghhh. I'll put that in the "If we don't leave a few bugs for later we >could never ship anything" pile. :) In my case it was a big deal, because full screen is an important feature. -- ____________________________________________________________ Sean McBride, B. Eng [email protected] Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
