My understanding is, due to auto release semantics, your object might be auto 
released again during current pool draining. So it will be put into outer 
Autorelease Pool, that's to say the dealloc are not guaranteed to be executed 
at specific timing. ARC still relies on retain/release/autorelease, so it has 
the same behavior.If your code must unregister notification before something 
else. It's better to find a more deterministic timing.

Sent from my iPhone

On 2011-12-8, at 上午4:56, Mikkel Islay <my.inputstr...@googlemail.com> wrote:

> Dear list,
> 
> A question regarding the proper use of dealloc in ARC-environments (under 
> iOS):
> I have a need to unregister NSNotification observers during exchange of 
> UiViewControllers. Is implementing - (void)dealloc considered a proper use 
> for this purpose? Is it safe to make assumptions regarding when in the 
> release-process dealloc is called?
> 
> Incidentally, the Apple List search tool appears not to work (i.e. returns no 
> results).
> 
> Thanks,
> Mikkel Islay
> 
> _______________________________________________
> 
> 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/yingshen.yu%40gmail.com
> 
> This email sent to yingshen...@gmail.com
_______________________________________________

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