title: Delete object for managing Memory heap in java
body: <p>I try to remove object for managing memory heap.</p>
  
  <p>but, it is not.. working.</p>
  
  <p>I have cache data(image data).
  Parent Class is Client(class name) which have a many images data.
  Client(Client Class have Study Class List) >> Study(Study Class have Series Class List) >> Series(Series Class have Image Class List) >> Image(Image Class have images data).</p>
  
  <p>I have tried some way(below)</p>
  
  <ol>
  <li><p>For managing memory heap I remove the best parent class object.
  ex) client: studyList.remove(key) -> not work</p></li>
  <li><p>I remove image data and all list
  ex) client: studyList.remove(key) + seriesList.remove(key) + imagedata = null -> not work;</p></li>
  </ol>
  
  <p>Activity Monitor(Macbook) shows java memory heap isn't free..</p>
  
  <p>Client Class have below:</p>
  
  <pre><code>private HashMap&lt;Integer, Study&gt; StudyListByKey = new HashMap&lt;Integer, Study&gt;();
  </code></pre>
  
  <p>Study Class have below:</p>
  
  <pre><code>private HashMap&lt;Integer, Series&gt; SeriesListByKey = new HashMap&lt;Integer, Series&gt;();
  </code></pre>
  
  <p>Series Class have below:</p>
  
  <pre><code>private HashMap&lt;Integer, Image&gt; ImageListByKey = new HashMap&lt;Integer, Image&gt;();
  </code></pre>
  
  <p>Image Class have below:</p>
  
  <pre><code>private ArrayList&lt;byte[]&gt; images = new ArrayList&lt;byte[]&gt;();
  </code></pre>
  
  <p>removing code Image data  is below:</p>
  
  <pre><code>public void removeDICOMImage() {
      this.logger.info(this.images);
      this.images = null;
  }
  </code></pre>
  
  <p>not.. work.. 
  How can I remove image data on memory heap??</p>
  
  <p>Well.. the grand grand.. parent Class Object will be free.. Child -> free?? </p>
  
  <p>I'm wrong??</p>