2

We were running Memory Analyzer Tool in our application to optimize it. We noticed that it always flags a large 1,127,584 byte Bitmap as a possible memory leak.

During analysis, we realized that it has nothing to do with our app and just creating a simple project with a single layout that contains any scrollable widget will show the same results as shown in the screenshot which flags the Bitmap.

Question is -- anyone know what this image is for and should we be concerned with it?

Possible Leak Suspect report showing a 1.1 meg bitmap

DustinB
  • 11,037
  • 5
  • 46
  • 54
  • Seems like it's related to the overscroll blue glowing you see when you reach the end of a list. – tolgap Sep 03 '13 at 14:49

2 Answers2

1

I am not sure if this problem is related, but take a look at my question:

Strange Bitmap using 1 Mb of Heap

We came to the solution that the Bitmap is system-related, and therefore not really of concern to the developer.

Which phone are you using and what are its screen dimensions?

Community
  • 1
  • 1
Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187
  • Ah, thanks Philipp! Not sure how I overlooked your question before, but it does indeed look to be very similar, if not the same. I know that the issue I'm seeing goes away as soon as I remove anything with a scrollview (such as a listview, webview, etc). I'm running on 4.2.2 Emulator with Galaxy Nexus screen dimensions. – DustinB Sep 04 '13 at 20:38
  • I am also using a ListView. Let me check if the bitmap goes away when removing it. – Philipp Jahoda Sep 04 '13 at 20:42
1

this is a late answer but maybe this will help others,I had a similar issue i've seen some big bitmap taking relatively a lot memory in the android studio heap dump, i found out it came from the scrollview so I've added this attribute to the xml to disable the scrollview effects and i dont see this allocation anymore in the heap dump.

android:overScrollMode="never"

p.s I can see now in the heap dump that the spinner DropDownListVew, when its opened has the same issue

Stas Krantsov
  • 26
  • 1
  • 4