On Apr 28, 6:02 pm, davidj <blahblah...@gmail.com> wrote:
> I have an Activity with an inner Handler. The problem is that after
> the activity is destroyed, the Handler is receiving messages for the
> destroyed activity. This breaks things because the activity is in an
> inconsistent state.
>
> I'm thinking this might be a bug in Android - it should probably
> delete all the messages in the queue when the activity is destroyed.
> There doesn't appear to be any way I can manually delete all messages
> in the queue (except by calling removeMessage(int what) with every
> possible variation of what, which seems a bit ridiculous).

use removeCallbacksAndMessages(null)

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to