title: Java LibGDX memory leak
body: <p>We're making a 2D topdown shooter game for our school assignment. But we ran into a problem which we just can't solve. We receive players and want to render them all. When we comment the code which is given, the lag is gone and the RAM usage is stable. However, when we leave the part in, the ram will increase every second with 50 MB/s. </p>
  
  <p>We can't find an error in this code, if you know something please let us know.
  If you need more information just let me know, I will try to answer them ASAP.</p>
  
  <pre><code>            List&lt;SimplePlayer&gt; localMultiplayers = new ArrayList(this.multiplayers);
              this.multiplayers.clear();
              for (SimplePlayer splayer : localMultiplayers) {
                  try {
                      Player p = new Player(splayer, this);
                      batch.setProjectionMatrix(game.camera.combined);
                      batch.begin();
                      p.render(batch);   
                      this.fontwhite.draw(batch, splayer.getName(), splayer.getX(), splayer.getY() + 76);
                      this.fontred.draw(batch, Integer.toString(splayer.getHitPoints()), splayer.getX() + 12, splayer.getY() + 64);
                      batch.end();
                  } catch (Exception ex) {
                  Logger.getLogger(GameScreen.class.getName()).log(Level.SEVERE, null, ex);
              }
          }
  </code></pre>
  
  <p>EDIT: This piece of code is found in our GameScreen.render(), we don't know if that could be the issue.</p>