title: Clearing an arraylist in many ways, but it's not freeing up memory
body: <p>I made a particle system thingie for fun and giggles, and it's working pretty well, even this problem is not catastrophic at all, it's just making me super curious.</p>
  
  <p>I store my particles in an ArrayList. When I middle mouse click on a particle emitter, it clears the arraylist, thus deltes all particles. And it's working. However, even after the arraylist is cleared, there seems to be not a single byte freed up in my RAM.</p>
  
  <p>I believe I don't have a way to reference individual particles, except through the arraylist, because I create all of them with this line:</p>
  
  <pre><code>particles.add(new Particle()); //particles is an ArrayList&lt;Particle&gt;, ofc.
  </code></pre>
  
  <p>Thus, I don't understand why the garbage collector isn't collecting them.
  I tried:</p>
  
  <p>using the empty() method(that's what I still use), and after/before(logically) that:</p>
  
  <ul>
  <li>setting all about-to-be-deleted Particle objects to null</li>
  <li>calling System.gc()</li>
  <li>overwriting the arraylist with a brand new, empty arraylist</li>
  <li>using trimToSize()</li>
  <li>starting the .jar with these parameters I found on the internets:
  -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode</li>
  <li>waiting entire minutes, maybe the garbage collector will suddenly work.</li>
  </ul>
  
  <p>But none of this resulted in any noticable change.</p>
  
  <p>I'm checking my ram usage through good old task manager. Could the problem be simply that it's displaying incorrectly?</p>