Sean McBride wrote:
On Wed, 26 May 2010 03:08:31 +1000, Gideon King said:




Glad you've tracked it down.  Just a comment though: my understanding is
that calling removeObserver from dealloc is, in general, discouraged. See here for some reasoning:

<http://www.karppinen.fi/analysistool/>


I don't believe that's actually true - although it's often stated as fact. There's nothing in any apple documentation I've ever seen which discourages it, if you run under GC it will even do this for you when your objects are cleaned up.

There's a long thread on this about a year ago where we were discussing the change in Snow Leopard to move the warning to the end of the dealloc method. The only reason for doing that would be to allow you to remove observers and the wording of the release note is quite persuasive.

I do this, quite often, I've never had an issue with it.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to