I have an AsyncTaskLoader that does some background task. While doing this task, it needs to access some views. (No I can't just get the values of the views beforehand - they are custom views, with some magic stuff attached to it - please just accept this)
However, this is causing a context leak because the AsyncTaskLoader is holding a reference to a Context object.
Question 1) Are context leaks that bad? (my loader runs only for 100ms - 200ms)
Question 2) Is there a way to hold a view without a context leak (I'm pretty sure not so this is just wishful thinking)
It's not that bad, right? Like the old views are garbage collected a fraction of a second later.- that's the only side effect, right?
For the record the view I need a reference to is CropImageView
from https://github.com/ArthurHub/Android-Image-Cropper and the method I need to call from inside the Loader is view.getCroppedImage(width, height, CropImageView.RequestSizeOptions.RESIZE_INSIDE);
(no I can't use the prepackaged async versions of getCroppedImage because of reasons)