1

I've made basic apps before but I'm very very new to using MAT in Eclipse for Android. I'm not sure if the following is a problem or not so I'm really just looking to see if this is something I eventually need to fix.

What is happening is I'm launching my app for the very first time and it heads to its MainActivity. Immediately after this, without interacting with the app again, I'll use MAT in eclipse to dump an HPROF file. I'll then look at its Histogram and filter it so that it only shows "MainActivity" stuff. This is where I get confused. I see multiple MainActivity's listed (but each with a dollar sign and number at the end of it). Basically, I see the following in the Histogram list:

Class Name                        Objects       Shallow Heap
class.example.MainActivity        1              160
class.example.MainActivity$1      1              8
class.example.MainActivity$2      1              8
class.example.MainActivity$3      1              8
class.example.MainActivity$4      1              8
class.example.MainActivity$5      0              0

The funny thing is MainActivity$5 has 0 objects in it (so I'm not sure why it's even listed). When I look at the objects inside each of them, they all show different objects that each are from different classes. I'm sure this is a complete beginner question but is this bad?

When I press "Update Heap" on the DDMS and then try "Cause GC" to do some garbage collecting, I don't see any changes as far as my memory goes. I've also never gotten an Out of Memory error.

I'm hoping this is a simple question for people who are familiar with these kinds of things. If there's something wrong or concerning about the app, I'll definitely try to hunt down the problem on my own. For now, I'd just like to know if this is something I should be looking into as a possible issue. Thanks for any help.

John Octavious
  • 221
  • 1
  • 3
  • 9

0 Answers0