How does this resolve the situation?
WeakReference allows Activity to collect garbage, so you don't have a memory leak.
A null reference means that AsyncTask cannot blindly try to update a user interface that is no longer bound, which will throw exceptions (for example, the view is not bound to window manager). Of course, you should check for a null value to avoid NPE.
if my asynthesis loads ten files, and after completion of 5 the activity restarts (due to a change in orientation), will my FileDownloadingTask be called again?
It depends on your implementation, but probably yes - if you are not intentionally doing something to make reloading unnecessary, for example, caching the results somewhere.
What will happen to the previous AsyncTask that was originally called?
In earlier versions of Android, it started before completion, downloading all the files only for their dumping (or, possibly, caching them, depending on your implementation).
In the new Android, I suspiciously that AsyncTask dies along with the Activity that launched them, but my basis for the suspicion is only that the memory leak demonstration for RoboSpice (see below) does not actually flow on my JellyBean devices.
If I can offer some tips: AsyncTask not suitable for performing potentially lengthy tasks such as networking.
IntentService is the best (and yet relatively simple) approach if one working thread is acceptable to you. Use the (local) Service if you want to control the thread pool, and be careful not to work on the main thread!
RoboSpice seems good if you are looking for a way to reliably perform networking in the background (disclaimer: I have not tried, I am not an affiliate). The game store has a demo application called RoboSpice Motivations , which explains why you should use it, disassembling anything that might go wrong with AsyncTask - including the WeakReference workaround.
See also this topic: Is AsyncTask conceptually flawed or am I just missing something?
Update:
I created a github project with an example download using IntentService for another SO question ( How to fix android.os.NetworkOnMainThreadException? ), But it is also relevant here, I think. This has the added benefit that by returning the result via onActivityResult , a download that is in flight when you rotate the device will be delivered to a restarted Activity .