It makes sense if you want to notify the listener of the completed AsyncTask, but you are not interested in the results if Fragment is no longer bound. In onPostExecute, you then check if the listener is present and if it uses it.
So, there is at least one use case where it makes sense to set the listener to null.
source share