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:
Watch more Android Performance Patterns here:
Join the G+ Community here :