Memory leaks, which in Java™ often result when objects hold on to references inappropriately, can degrade performance and eventually cause a program to crash. The Profiling and Logging perspective includes views for analyzing memory usage in an application and for detecting these leaks.
The following views are available for memory leak analysis:
After identifying a leak, you can use Probekit to design custom probes to investigate specific objects that might be leaking.
To identify leak candidates quickly, perform memory leak analysis by profiling with a Memory Leak Analysis profiling set. You can also examine memory usage by profiling with the Memory Analysis profiling set; you can browse this data with the Object Reference Graph, the Object References, and the Object Details views, but you cannot use the data to generate a list of leak candidates.
Memory leak analysis uses advanced algorithms to identify potential memory leaks based on a comparison of two heap dumps. You can define a profiling configuration either to allow you to capture heap dumps manually, or to capture heap dumps automatically at times that you specified in the profiling set.
To analyze leaks:
You can now modify your code to clean up the references that are no longer useful, so that the garbage collector can collect unneeded objects. Profile your application again to verify that you have fixed the leak, and to detect additional leaks.
For more information, read Analyzing memory leaks.
The Memory Analysis profiling set, with the Basic Memory Analysis profiling type, allows you to collect object references and view heap dumps. Note that you can view this data in the Object Reference Graph, Object References, and Object Details views, but you cannot use it to generate a list of leak candidates.
To investigate memory usage: