A memory leak is a Java heap object that is reachable via a regular
Java reference but no longer used by the application. The heap memory
occupied by objects that are no longer needed should be automatically released
by the JVM's garbage collector. As the garbage collector only considers
unreachable objects as "garbage" all unused yet reachable objects remains
alive and waste memory.
As long as an application produces only a small amount of memory leaks
no harm is done. If, however, the application has many (or large) memory
leaks that accumulate over time, then the waste of memory might have an
adverse effect on the application's overall efficiency - possibly to a
degree where the application goes out of memory and crashes. As a
precaution it is advisable to search for memory leaks in an application
and to eleminate them before they cause harm.
Without a tool it is virtually impossible to detect a memory leak.
For this reason we will be using a couple of tools that support memory
leak detection. The lecture will discuss strategies for finding memory
leaks; they differ depending on the nature of the respective memory leak.
During the workshop's hands-on part the attendants will have the opportunity
to try out the tools and practice the search for memory leaks. |