Everything gets cleaned up when the process is terminated.
However, I think the idea is that you use Looper to run an event queue/loop in a particular thread, processing messages.
One of those messages should be some kind of "quit" message that would be added to the queue up by some other thread, or by this thread's logic. This special message would then call Looper.quit, terminating the loop, and allowing the thread to exit.
-- Kostya 28.09.2010 14:43, Kakyoin пишет:
Hi. Allow me to make another thread exclusively for this. I'm sure other dev would want to know as well. According to the doc here: http://developer.android.com/reference/android/os/Looper.html#loop() -------------------------------------------------------------------------- public static final void loop () Since: API Level 1 Run the message queue in this thread. Be sure to call quit() to end the loop. -------------------------------------------------------------------------- Question: If I use Looper.prepare() and then Looper.loop() like this: -------------------------------------------------------------------------- new Thread(){ @Override public void run() { Looper.prepare(); // my code here (create handler and stuff) Looper.loop(); } }.start(); -------------------------------------------------------------------------- What will happen if I don't call quit()? Actually I have no idea 'when' and 'where' should I call quit(). Will this "loop" disappear by itself after my application exit? Thank you in advance!
-- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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

