title: JProfiler memory views -> Object size
body: <p>I have the following classes in my application:</p>
  
  <pre><code>class A {
    String someString;
    Locale someLocale;
  
    Map&lt;Integer, B&gt; someMap = new HashMap&lt;Integer, B&gt;();
  
    fillMap() {
      // some logic to fill the map with instances of B
    }
  }
  
  class B {
    // lots of filled collections
  }
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>