Skip to content

AsyncTask is not cancelled #26

@pangeneral

Description

@pangeneral

There is a annoymous AsyncTask object in au.com.wallaceit.reddinator.core.SubredditManager.loadDefaultSubredditsau methods. This object won't be cancelled. I think we should replace it with non-anonymous object and cancel it in the onDestroy() method.

public void loadDefaultSubreddits(){
	try {
		subreddits = new JSONObject(defaultSubreddits); // start with front page and all
	} catch (JSONException e) {
		e.printStackTrace();
	}
	new LoadDefaultSubredditsTask().execute();
}

Similarly, the finish() method in au.com.wallaceit.reddinator.activity can't guarantee loadPostTask will be cancelled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions