0

I am trying to analyze the heap dump of my android app. The analyzer MAT shows me this message

The class "android.content.res.Resources", loaded by "", occupies 12,084,776 (87.38%) bytes. The memory is accumulated in one instance of "java.lang.Object[]" loaded by "".

What do I do about this? I want to avoid OutOfMemoryError.

user1059747
  • 33
  • 1
  • 7

3 Answers3

1

As almuneef mentioned, this is mostly seen when the size of your resources is large. Are you trying to load a bitmap? You might want to look at Android memory allocation

Community
  • 1
  • 1
Tushar Gupta
  • 1,410
  • 13
  • 22
0

Your problem is due to the large resources. Just reduce the size of your resources and your issue will be fixed. If your resources are in .png format then change it to jpeg and you can easily reduce the quality of the image (size also reduces considerably for even a small loss in quality) Hope this will fix your out of memory issues

almuneef
  • 126
  • 4
0

Don’t worry about “android.content.res.Resources”,It was loaded by system,

Gracker
  • 524
  • 3
  • 9