ADT's lint checker says:
This Handler class should be static or leaks might occur
What's the meaning of the leak handler?
from http://tools.android.com/tips/lint-checks
HandlerLeak
Summary: Ensures that Handler classes do not hold on to a reference to an outer class
Priority: 4 / 10 Severity: Warning Category: Performance
In Android, Handler classes should be static or leaks might occur. Messages enqueued on the application thread's MessageQueue also retain their target Handler. If the Handler is an inner class, its outer class will be retained as well. To avoid leaking the outer class, declare the Handler as a static nested class with a WeakReference to its outer class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With