My application uses a lot more memory than I think it suppose to use, and I'm trying to understand which class is using a large amount of the memory and maybe not releasing it.
I'm using VisualVM and in the memory sampler I can see that most of the memory is spent on Chars, Strings and Bytes, all my classes uses Strings, but as you know the VisualVM shows ALL Chars and Strings in the system (all the Chars are identical to the Strings which makes it hard to understand who holds them), as I understand the size of the other classes that hold these strings is calculated without the strings.
How can I see in this tool who are the "Real" largest classes - the ones that holds all these strings? (preferably if I can get from these classes to their Strings and not the other way around) I tried to use the "root to the nearest GC" in the heapDump but there are about 4,000,000 Strings so the chance of me finding the "problematic" ones is very small...
Thanks!!!