1

Background

android apps usually have a low amount of heap memory for them. that's why you always need to avoid holding large objects.

since the app i'm working on can get OOM on some cases, i thought that i should check out what causes the memory to be low.

i've used MAT plugin and i've found out that the app has 3 bitmaps that take 3.5MB each.

The problem

the app already has multiple bitmaps being used, but they are way smaller (less than 1MB each).

in fact i've even put breakpoints to make sure each bitmap i create don't take so much memory, and found nothing.

i've also watched some google IO videos (like this one) regarding this matter. it seems that in order to see which class has a reference to the object, you click on the object and choose "Path to GC roots"=>"exclude weak references".

What I've tried

you can see in the dominator-tree which bitmaps take the most (look at "retained heap").

in order to export the data, you can choose the byte array and then "copy"=>"save value to file".

however, like others have tried on this post , i'm stuck at showing the bitmap itself (need to know its format, width and height). plus it could be quite annoying to use GIMP for this task.

The question

how can i view the bitmaps (the image itself) within eclipse?

Community
  • 1
  • 1
android developer
  • 114,585
  • 152
  • 739
  • 1,270
  • See [this question](http://stackoverflow.com/questions/12709603/mat-eclipse-memory-analyzer-how-to-view-bitmaps-from-memory-dump) for viewing your bitmaps from the heap dump. – wsanville Oct 22 '13 at 06:24
  • @wsanville isn't there an easier way? within eclipse? also, it seems they didn't answer the question of how to find out the width and height , and i think the created files are much smaller than those that MAT shows (which is weird since they should be RAW). – android developer Oct 22 '13 at 07:58

0 Answers0