I'm trying to understand a curiosity that I've recently come across.

I have an IntentService which handles a message.  Occasionally, as
part of that processing, I created a Handler to have some code run in
the future.  Of course, the onHandleIntent() returns and I then see
onDestroy() called.  However, at the proper time, I still see the
Handler run.  This is what I originally wanted, but I'm wondering how
it's still running, since the handler is tied to its originating
thread, which is supposed to have already died.

Another thing I noticed in the debugger is that these IntentService
threads never go away even though onDestroy() was called.  e.g. if I
fire 10 messages for the service to handle at various times, I see 10
service threads in the debugger.  I'm not sure if they just haven't
been GC'd or if I'm doing something wrong and they're hanging around.

Can anyone shed some light on these questions?

Thanks,
- Rick

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

Reply via email to