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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:10:46+00:00 2026-05-24T17:10:46+00:00

I think it is asked and asked before, but still, there are things I

  • 0

I think it is asked and asked before, but still, there are things I can’t quite understand.

I have tried two different approaches:

  1. Keep all the images in memory, when certain limit is started to exceed, start removing them
  2. Let Android fix this with SoftReferences

In 2. it’s just cleaning them up sometimes the second I allocate them! And I don’t allocate too much – 30-40 images 50×50 pixels.

So I am sticking to one. The question is what is the limit?

  1. Can I get some reliable info from the device of how much exactly bitmap memory do I have left? I have done some research, watch DDMS values, it’s just taking up more and more space (if I don’t clean up) until it explodes. One moment there are only 200K left, next the system provides 2M more…
  2. I am currently using some heuristic decision, based on device model, or screen size. I think this is dead-end in the long run. Got memory exceptions on some phones, completely free on other.
  3. Is there a third solution, the right one?
  • 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-05-24T17:10:47+00:00Added an answer on May 24, 2026 at 5:10 pm

    Most important question: Are you recycle()-ing your bitmaps? This is very important for pre-Gingerbread applications (maybe post-Gingerbread too).

    Watching the Memory Management for Android Apps session from Google I/O 2011 helped me get a better understanding of the peculiarities of developing for Android.

    That video mentions a tool called MAT – a Memory Analyzer – which is useful for determining if you have objects hanging around in memory that have been leaked. It’s possibly you have more than the 30-40 you think you have.

    For viewing and/or logging the current size of heap, etc., I’d suggest using the code in this answer about Android Out of Memory exceptions.

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

Sidebar

Related Questions

I think it might have been asked before but i was unable to find
I have a small question and I think this is asked before but I
(I have asked this before but I dont think I was direct enough with
i have asked this question before but no answer was there. so asking again.
I know similar questions have been asked before but i think this is slightly
probably this question has been asked in many forms before but still I think
I think I've asked this before but I can't find the question now, and
There are similar questions to this, but I don't think anyone has asked this
I know this sort of question has been asked before , but I still
I know the 'unable to bind msg' has been asked before but I think

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.