I used MAT tool in Eclipse to investigate a memory leak issue. I found that the leak was caused by an anonymous inner class instance in my app. The class name displayed in MAT is com.mycompany.myproduct.MyActivity$3. There are many anonymous inner classes defined in MyActivity.java. How do I know the which inner class com.mycompany.myproduct.MyActivity$3 indicates?
Thanks.
On the Oracle compiler, they’re numbered in order of occurrence in the class. I’m not sure if that’s part of any specification or consistent with other implementations.
You could decompile the class–JD-GUI is a great tool for that–and then you’ll see what you want to know. You could even just go with basic disassembly using
javap -c. It’ll give you a rough idea of where the classes occur.