Re: Can I call unbind: in finalize? Is it thread safe?
Re: Can I call unbind: in finalize? Is it thread safe?
- Subject: Re: Can I call unbind: in finalize? Is it thread safe?
- From: "Kyle Sluder" <email@hidden>
- Date: Wed, 7 Jan 2009 22:12:08 -0500
On Wed, Jan 7, 2009 at 4:55 PM, Sean McBride <email@hidden> wrote:
> When do AppKit views call unbind:?
You say you're familiar with mmalc's recommendations... but this
question is explicitly addressed in the "Unbinding" section. I assume
you want to call -unbind: so as to remove your view from observing a
controller (doing it "for cleanliness sake" is useless; bindings are
essentially UI design conveniences for KVO). Call -unbind: in
-viewWillMoveToSuperview: (as long as the view doesn't become
fullscreen).
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html#unbinding
As for whether it's thread safe, I would say no, because Cocoa
Bindings in general is not thread safe. See Chris Hanson's post on
the topic: http://chanson.livejournal.com/2005/07/23/
--Kyle Sluder
_______________________________________________
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