title: Memory leak in Java application
body: <p>I have an application, that among other things uses SSL. The point of the application is that it will run infinitely. The problem now is, it seems, that over time i get the following image:</p>
  
  <p><img src="https://i.stack.imgur.com/W6Bbh.png" alt="Leaking"></p>
  
  <p>Now in the beginning, I take a look at the heap dump (with Memory Analyzer Tool from eclipse) at 2 points: 1 when my app reaches the highest point of memory usage and at the lowest (where, i presume a garbage collection occured.) In the beginning everything is fine, my app has a couple of objects in the finalizer queue and these dissapear. But half hour later, for no apparent reason, while the garbage collection occurs, the references to the finalizer class do not dissapear. These keep increasing in size, and there are 10 references, which point to an object and to the next finalizer in queue, that keep reoccuring. So its actually a repeating chain, of references to the same things, that never gets collected. While this did get collected in the beginning. </p>
  
  <p>So my question is actually 2 fold: first question: What could be the cause of this to suddenly not get collected? (Because I've looked in my code pretty carefully, I'm fairly certain I do close the things that are being referenced by the finalizer class (inputstreams and outputstreams, apparently. Also some abstract stuff from the SSL library i'm using, but fairly certain there is nothing to close there. I'm using a general Client.getConnectionManager().shutdown() which I suppose should clear that up, which it does in the beginning). Could it be, that while the app repeats itself over and over, that for some reason the reference queue got too big and the collector just can't handle it? </p>
  
  <p>Second question is: how might I go about to solving this issue? The image you are seeing is btw from the Jconsole, and when i perform the manual GC, these do all dissapear, and start over. </p>
  
  <p>Any help or nudge in the right direction is much appreciated.</p>