I have the following classes in my application:
class A {
String someString;
Locale someLocale;
Map<Integer, B> someMap = new HashMap<Integer, B>();
fillMap() {
// some logic to fill the map with instances of B
}
}
class B {
// lots of filled collections
}
I'm doing a profiling session with JProfiler to identify some memory problems. On the Memory View tab, with Aggregation level Classes, I have for example 2000 instances of A, with a total size of 156KB.
My question would be what this size means? Is it just the size of the references to the A object or also the size of all the filled members of A (I'm wondering especially about the Map)? I guess it's somehow only the A reference size but wanted to make sure of this.