Memory leak is a type of resource drain that occurs when an application allocates memory and does not release after finish using it. This allocated memory can not be used for any other purpose and it remains wasted. As a consequence, Java applications will exhibit one or more of these non-desirable behaviors: poor response time, long JVM pauses, application hang or even crash.
I came across two tools named Eclipse MAT and Heap Hero, the cloud-based heap dump analysis tool. Registration, download or installation is not required to use the tool. Just upload your application's heap dumps & review the beautiful reports instantly.
JVM created the object in Heap and create the reference of those object. Every major or minor garbage collection cycles un-reference objects are cleared from memory if objects are remain in memory which is referenced but not in used. it is not getting clear. Memory leaks you can primarily analyze GC logs check heap usage directly run time using JConsole or Java mission control. Collect the heap dumps. You can use online tools like heap hero which can analyze the heap data or better you can use Java mission control.
GC settings and Heap size can be tune after analyzing the data. Sometime huge heap size is allocated which cause longer pause for major GC but application not required that much heap. By the way which version of JDK are you using? Are you running JAVA EE or SE?