I have a problem with a Java memory leak, which for some reason does not show up in my profiler (Yourkit). When I run my Java application (A server with some threads for listening, sending and processing data) it seems that every time I get a new connection and this connection is removed some memory is not cleaned up. At least, this is what windows (and Linux) say.
When I run my application with my profiler, it simply shows the memory the way it is supposed to be, when a thread is closed all the memory is cleaned up. However, in reality, after a while Java simply crashed because it uses too much memory, so regardless of what my profiler says, I tend to believe windows and Linux that I do use it. Running garbage collection does not clean up the memory either.
So what could this be? I've tried everything I know, close the threads, set all the objects to null, delete the content of every array, etc. I am pretty sure the threads are closed because both eclipse and the compiler and the printouts seem to confirm this.
Does anyone have a clue?