On Thu, 08 Dec 2011 20:31:51 +0100, Mikkel Islay 
<my.inputstr...@googlemail.com> said:
>A twist on the tale, is that the observer wasn't the UIViewController, but a 
>helper object subclassed from NSObject. Hence view-unloading was one step 
>further removed from deallocation of the observer-instance. 

I have *never* added or removed any object other than self in the notification 
center. I would rather rearchitect some other aspect of my app to get messages 
passed around than break this rule.

Actually, I did it once and became hopelessly confused: my notification was 
never arriving and I didn't know why, and I couldn't easily find out because 
you can't query the notification center as to what observers it's got 
registered. Eventually it turned out that some other object was unregistering 
me behind my back. So since that day I have followed the above rule and have 
been a happy camper. I'm not saying it isn't possible, I'm not saying you 
shouldn't do it, I'm just saying. :) m.

--
matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________

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