Loaded classes in VisualVM
I am having problems with the heap memory of my application and I try to use VisualVM in order to find the memory leaks. There is something that I don't manage to understand. In the tab "Sampler", when I press the Memory button, I see a few thousands classes, having instances. If I do the same thing in the "Profiler" tab, I see much fewer classes, and this time they are "Alive Classes". If I look in the Monitor Tab, I see over 10.000 classes at Total Loaded. Can you help me with this? Also, if I have more tha开发者_如何学运维n 1 instance for a class, is there any way to find out more about this instance?
Thank you.
I would recommend that you do a heapdump to see more information - the live views is not that good for that.
To do a heap dump:
- Locate your application in the application list(/tree)
- Right click on it and take heap dump
Or click on monitor and "heap dump" (up to the right):
精彩评论