Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Java can only release memory for objects that are no longer referenced (i.e., in use) by the program. And, once an object is no longer referenced, it will be cleaned up fairly quickly (albeit in a way that's out of your <em>direct</em> control).</p> <p>This is likely a straightforward <a href="http://en.wikipedia.org/wiki/Memory_leak" rel="nofollow noreferrer">memory leak</a>. You'll need to analyse the memory to see which objects are there that shouldn't be, and then determine <em>why</em> the garbage collector thinks they are still reachable. At some point in your code you'll be failing to release these variables that are no longer needed (for example, putting them in a <code>Map</code>, though there are <em>many</em> ways of leaking memory if you're not careful).</p> <p>The first step is to analyse the heap to find out which objects are there that shouldn't be. You can use <a href="http://download.oracle.com/javase/6/docs/technotes/tools/share/jhat.html" rel="nofollow noreferrer">jhat</a>, <a href="https://visualvm.dev.java.net/heapdump.html" rel="nofollow noreferrer">jvisualvm</a>, various profilers and likely other tools for this.</p> <hr> <p>The following questions may be of use in solving this issue:</p> <ul> <li><a href="https://stackoverflow.com/questions/40119/how-to-find-a-java-memory-leak">How to find a Java memory leak</a></li> <li><a href="https://stackoverflow.com/questions/670791/common-java-memory-reference-leak-patterns">Common Java memory/reference leak patterns?</a></li> <li><a href="https://stackoverflow.com/questions/2507362/how-to-free-up-memory">How to free up memory?</a></li> <li><a href="https://stackoverflow.com/questions/2960345/best-practice-for-handling-memory-leaks-in-large-java-projects">Best practice for handling memory leaks in large Java projects?</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload