Let’s say you’ve got some 20 bitmaps being decoded on a worker thread. Well, what happens if your activity is destroyed before that work completes?
In this video Doug Stevenson explains Loaders. A super-helpful class that can give you insight into how the activity lifecycle is changing, so that you can better understand how to address threaded work that might be in flight.
See Android Architecture sample code here: https://goo.gl/MWXVav
Watch more Android Performance Patterns here: http://goo.gl/4ZJkY1
Join the G+ Community here : http://goo.gl/g7mxmI
Subscribe to the Android Developers channel at http://goo.gl/GEh1ds