I am currently doing something similar in the AsyncTask onPostExecute method, where NewTask not the current task performing:
private class OlderTask extends AsyncTask<String, Void, Integer> { //other functions (not important) @Override protected void onPostExecute(Integer result) { new NewTask().execute(null, null); } }
I wonder if this is bad. Will the GC do this for OlderTask to wait for NewTask? Are there other possible problems using this approach?
And if this is a problem, how can I fix it?
garbage-collection android android-asynctask
yydl
source share