FreeKB - Understanding memory leak in Java
Understanding memory leak in Java

Home > Search


A memory leak is a situation where objects are placed in a JVMs heap space and are not removed by the application that placed the object in the heap and is also not removed by the JVMs garbage collector. As an example, an application may place place an object in the heap for a SQL query. If the application application fails to remove the object from the heap, this could produce a memory leak. Typically, a memory leak is a sort of slow process where objects keep on getting placed in the heap and are not removed. Picture a cup below a leaky faucet. Given enough time, the cup will run out of space. In the same way, a JVM will eventually run out of memory, which leads to the dreaded Out Of Memory condition.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 041b3 in the box below so that we can be sure you are a human.




Comments