dragas
05/17/2017, 11:41 AMAsyncTask
to still keep a reference and publish progress to your fragment/activity/service/anything. Question stands, shouldn't it be WeakReference
? I'd assume that ART does not garbage collect running threads and if your application is suddenly ended, keeping a hard reference to your context will prevent ART from garbage collecting it.miha-x64
05/17/2017, 12:41 PMkirillrakhman
05/17/2017, 1:21 PMAsyncTask
as there are much better alternativesabdellah
05/17/2017, 1:46 PMAsyncTask
those days because their limitations/problemsmiha-x64
05/17/2017, 1:49 PMabdellah
05/17/2017, 1:51 PMdragas
05/17/2017, 1:52 PMdoAsync
?kirillrakhman
05/17/2017, 2:55 PMAsyncTask
and only mitigates the problem with leaks by keeping weak references. Using RxJava in combination with, say RxLifecycle will give you a clearer code structure and better leak protection