[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.technology.memory-analyzer] Inconsistent display of HashMap-keys
|
Hi,
I just opened two heap dumps and noticed a HashMap having String's as keys
and wondered why the keys were so big.
The display looks like this:
HashMap
- table java.util.HashMap$Entry[xxx]
-- <class> java.util.HashMap$Entry[]
-- [yyy] java.util.HashMap$Entry @ 0x...
--- <class> java.util.HashMap$Entry
--- key java.lang.String @ 0x... some_string (retained heap: 24)
---- <class> java.lang.String
---- value char[zzz] @ 0x... some_other_string (retained heap: 30,336)
I'm a little bit confused why the key-Member has actually a very low
retained heap size and displays a different string than the char[] inside
the String which has an even bigger retained heap size. This can be seen
on every HashMap-Entry I checked from this map (it contains actually
100.000 elements ;). Is there anything I'm doing wrong in my very simple
assumption that the key should be the same as the char[] inside it?
Regards,
Stefan