title: Java heap space analysis using MAT shows many references to JTDS temp files as cause of OutOfMemoryError
body: <p>Please find below the dominator tree when analyzing the heap dump after an OOM error occured. 87% of the memory is consumed by a huge list of LinkedHashMap which is referencing the JTDS temp files. I do not understand why so many temp files are being created and they aren't being deleted due to possible references of the LinkedHashMap blocking garbage collection. But why can this happen? Is this a connection pooling related issue? Correct me if I am wrong regarding the analysis.</p>
  <p>I am using the following version of libraries :</p>
  <pre><code>java 1.8 v291
  Tomcat v9.0.54
  Spring v4.1.6
  Hibernate v4.0
  JTDS v1.2.2
  C3P0 v0.9.1.2
  JNDI v1.2.1
  </code></pre>
  <p><a href="https://i.stack.imgur.com/yyQQ5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yyQQ5.png" alt="enter image description here" /></a></p>