In Android development, I've learnt that AsyncTask defined as a non-static nested class is not ideal because it may cause memory leaks when the Activity that started the task, dies before the task has finished processing.
So the solution to use Loaders, whose lifecycle is independent to that of the activity.
However, what about in a situation like this where they've defined an anonymous AsyncTaskLoader. It looks to me that this Loader has a reference to its outer activity.
(1) Does this not cause a memory leak, where the starting activity is unable to be garbage collected?
Furthermore, the Loader's onStartLoading() method holds a reference to the outer activity's member mLoadingIndicator.
(2) If onCreateLoader is only called the first time the application launches, will this loader forever latch on to that first activity's mLoadingIndicator, ignoring the view from the new activity? (For example after configuration change)