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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:31:12+00:00 2026-05-26T21:31:12+00:00

I think my android app is leaking memory. I’m not absolutely sure that this

  • 0

I think my android app is leaking memory. I’m not absolutely sure that this is the problem though.

Every so often the app crashes when opening, and logcat shows an “out of memory” exception trying to load a bitmap image.

After crashing, I re-open the app and it works fine. Logcat shows lots of “gc”s and every once in a while the JIT table is resized upwards, never downwards until the app crashes with the out of memory error.

Does this sound like a memory leak? If so, how do I go about locating and closing the leak.

Here is my adb shell meminfo for my app.

** MEMINFO in pid 2691 [com.example.deepcliff] **
                    native   dalvik    other    total
            size:    23264     8839      N/A    32103
       allocated:    12503     3826      N/A    16329
            free:      168     5013      N/A     5181
           (Pss):     2512     1395    13815    17722
  (shared dirty):     2088     1844     5008     8940
    (priv dirty):     2412      224    11316    13952

 Objects
           Views:        0        ViewRoots:        0
     AppContexts:        0       Activities:        0
          Assets:        2    AssetManagers:        2
   Local Binders:       55    Proxy Binders:       13
Death Recipients:        1
 OpenSSL Sockets:        0

 SQL
               heap:      129         MEMORY_USED:      129
 PAGECACHE_OVERFLOW:        9         MALLOC_SIZE:       50

 DATABASES
      pgsz     dbsz   Lookaside(b)  Dbname
         1       14             10  webview.db
         1        6             18  webviewCache.db

 Asset Allocations
    zip:/data/app/com.example.deepcliff-2.apk:/resources.arsc: 17K
  • 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-26T21:31:13+00:00Added an answer on May 26, 2026 at 9:31 pm

    Here are a couple of articles and posts, which probably help you to get on the right track:

    Allocation tracker, which comes with Android SDK is very useful. Read Romain Guy’s articles. It helped me to track down pretty nasty leaks. It also helps you to write better software. E.g. I learned to create less objects, use more StringBuilder, and cache a lot more:
    What Android tools and methods work best to find memory/resource leaks?

    Sometimes your app is just so messed up that you have to re-design it in the whole. Here are official, good hints for that (my favourite is the Avoid Creating Unnecessary Objects):
    http://developer.android.com/guide/practices/design/performance.html

    Here’s an excellent article about attacking your memory issues:
    http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html

    Official article about avoiding memory leaks:
    http://android-developers.blogspot.co.uk/2009/01/avoiding-memory-leaks.html

    Read also this: tool to check memory leaks in android

    Others already pointed about bitmaps. Here’s an article describing the issue: http://zrgiu.com/blog/2011/01/android-bitmaps-and-out-of-memory-errors/

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

Sidebar

Related Questions

I am working on an Android app and I need to make sure that
I'm getting weird problems in my android app and I think it may be
In my Android app I have a service that is started via AlarmManager. I
I'm making an Android app that tracks a user and displays their location in
We're designing an Android app that has several activities which are working in a
I'm creating an android app that is exchanging data with a web app via
Sending the below request in my phonegapp-ed android app works for GET but not
I am a php/mysql developer learning android. I am creating an android app that
To begin with, this is the first Android app I'm writing, and I have
I know this cannot be as hard I think it is. I am sure

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.