Android: Quitting the Looper?
Posted
by stormin986
on Stack Overflow
See other posts from Stack Overflow
or by stormin986
Published on 2010-05-08T06:55:18Z
Indexed on
2010/05/08
7:08 UTC
Read the original article
Hit count: 270
I have a thread I use to periodically update the data in my Activity. I create the thread and start a looper for using a handler with postDelay()
. In onDestroy() for my activity, I call removeCallbacks() on my handler.
Should I then call handler.getLooper().quit()
? Or not worry about it and let the OS deal with it? Or would it just run forever then, consuming CPU cycles?
© Stack Overflow or respective owner