Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9266459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:19:26+00:00 2026-06-18T14:19:26+00:00

In my app, I continuously create an AsyncTask about every 5 seconds. I have

  • 0

In my app, I continuously create an AsyncTask about every 5 seconds. I have inspected the task during debug and can clearly see that the task always completes its process and exits the doInBackground method. No code in the onPostExecute is ever executed. Yet the AsyncTask continues to remain in memory as I can see in Eclipse. I thought that maybe it would just get reused for the next loop or eventually garbage collected but another one gets created and this continues. Eventually enough of them get created and slows the system down.

What could be the potential problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:19:27+00:00Added an answer on June 18, 2026 at 2:19 pm

    AsyncTask manages a thread pool, created with ThreadPoolExecutor. It
    will have from 5 to 128 threads. If there are more than 5 threads,
    those extra threads will stick around for at most 10 seconds before
    being removed. (note: these figures are for the presently-visible open
    source code and vary by Android release).

    Leave the AsyncTask threads alone, please

    Source question: AsyncTask threads never die

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a C# console app which continuously creates text files with randomly
I would like to have an event triggered in my app which runs continuously
My app will create an object. That object will continuously run one of its
I write a simple application to understand POSIX message queues. But the app continuously
I'm working on an app that plays audio continuously using the waveOut... API from
While deploying a dwr web app, i'm continuously getting this error. I dont know
In my mind, a web app something that runs continuously; therefore, I'm confused by
I can't seem to figure this one out. I have a validator-type script that
I've a problem that number of Handles in my app is continuously growing. I
I have a module that builds an app called MyApp. I have another that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.