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 8102337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:13:07+00:00 2026-06-05T23:13:07+00:00

My android app leaks, what should I check? I gave a look at avoiding

  • 0

My android app leaks, what should I check?

I gave a look at avoiding memory leaks and I added some unbindDrawables() calls in the onDestroy() methods of the activities to clean up but nothing changed. I also replace every getContext() calls by getApplicationContext() but nothing changed either.

I monitor the heap size in the DDMS eclipse perspective : when I launch the app for the first time there 3Mb allocated and after 10 close/restart it there’s 10Mb allocated.

My views are mainly composed of ViewFlippers and many nested Layouts that inherit from a subclass of LinearLayout.

EDIT:

after running MAT to identify leak suspects the main problem is :

16 instances of "org.apache.http.impl.conn.tsccm.ConnPoolByRoute", 
loaded by "<system class loader>" occupy 4,000,328 (44.08%) bytes.
  • 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-05T23:13:09+00:00Added an answer on June 5, 2026 at 11:13 pm

    If you’re using getApplicationContext() all over the place then for sure you are leaking memory! That’s generally a bad idea. You need to use the proper context in the proper place.

    Take a heap dump, use a profiler (like MAT or jhat) and look at the instances that shouldn’t be there (activities that should have been destroyed). Follow the chain of references back and figure out why they aren’t getting reclaimed.

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

Sidebar

Related Questions

i am building an android application but i have some questions about the memory
So I followed a post on avoiding WebView memory leaks, which suggests to use
I think my android app is leaking memory. I'm not absolutely sure that this
My android app is taking more and more memory over time. I took a
My android app has a two word app name, and the 2nd word doesn't
My android app project need to add a new function of saving the click
My android app was launching fine to both my HTC phone and my Android
An android app I'm working on relies on a web page for most of
We have an Android app and a Web Service. We want to download part
I have an Android app with a ListActivity in the main view. The list

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.