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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:18:17+00:00 2026-06-15T06:18:17+00:00

I experience some memory leaks in my android application. I’ve already used MAT to

  • 0

I experience some memory leaks in my android application. I’ve already used MAT to analyze the memory usage. But I have one question from the DDMS perspectiv in Eclipse, what does 1-byte array[byte[], boolean[]) mean?

enter image description here

Is this specific for my application? You can see that this is the big memory leak issue, this always increases in size, and the rest will increase and decrease randomly. My guess is that the GC doesn’t catch this type. Can anybody explain why this happen, with this little information?

  • 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-15T06:18:18+00:00Added an answer on June 15, 2026 at 6:18 am

    A byte and a boolean are each 1 byte. If you have an array of those you have a “1-byte array”.

    A ByteBuffer for example should internally hold one of those.

    You have a total of 614 of them where the smallest one be a byte[24] (or boolean[24]), the largest one is 3MB. All of them together use 104MB.

    The GC will get rid of them if they are no longer referenced.

    For example when you put

    private static byte myArray[] = new byte[3 * 1024 * 1024];
    

    in one of your classes and never set it back to null (myArray = null) then this one can’t be garbage collected because another Object has a reference to it. The object would be the class itself (as in String.class). The class object can’t be garbage collected since classes are never unloaded. (they are referenced by their ClassLoader which could itself be referenced / loaded by another ClassLoader and you can’t create Objects & use classes without them – they need to stay and they need to keep a reference to their classes)

    It’s usually not that simple but often start with static somewhere.

    Within MAT (after you force GC) look at the reference chain for the objects that are no longer intended to stay alive and identify the one Object that holds the reference. Set that one to null in your code and your leak is gone. Explained in more detail here:

    http://android-developers.blogspot.de/2011/03/memory-analysis-for-android.html

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

Sidebar

Related Questions

I'm experience some memory leaks in my application. The first time I suspected the
I had some experience of android but know almost nothing of GCC Makefile. Here
I have some experience using parallel extensions in .Net development, but I was looking
I have some experience with Java , C , databases , networking etc..But anything
Hi I have some experience with programming but I'm not very good with pointers.
I have some experience with ANTLR 2's C++ target, but have been hesitant to
I'm new to the C++ world, but I have some experience with C and
I have experienced some memory managment ambiguitys with opencv. You could do this with
I have some experience in ASP.Net and can work my way around it without
I have some experience writing web applications in Java for class projects. My first

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.