I get an .hprof file and I’m analyzing it with Eclipse Memory Analyser (MAT).
I run Top Component report and, in Duplicate Strings section, MAT detects some String instances with identical content.
I’m working with String.intern() and other homework for me, but now this is not my question.
That report shows me duplicated Strings like these:
- \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000….
- \u000a\u0009\u0009
- \u000a\u0009\u0009\u0009\u0009
And so on.
Other Strings are readable, but, how about these ones? I’m thinking they are from XML parsing (I use JibX in my app).
My questions are:
- What do you think these strings are coming? How can I analyse them better?
- If they are from XML parsing or something else, how can I clean/clear them after parsing? Maybe is JibX 1.0.1 Release too old for these issues?
Any suggestion about these UTF-8 like Strings would be very appreciated. Thanks in advance.
You can right-click on the suspicious String and select List Objects/With Incoming References. This will show you the objects that reference your Strings.