In VM Telemetry graphs of the Profiler you can see Surviving Generations metrics which can detect potential memory leaks. Here's a three-lines definition of the what the metrics mean:
Typically there are several long-lived objects (like an application's main
JFrame etc.) in an application representing one or a few Surviving Generations. There are also many short-lived objects created very frequently (such as
Dimension etc.) and released soon, typically within only a few garbage collections. They also represent just several Surviving Generations.
After some period of time the number of Surviving Generations in an application should become stable because all long-lived objects have already been created and newly-created short-lived objects are periodically being released from the heap. However, if there is a memory leak in an application which prevents newly-created objects from being released from the heap (for example objects stored in a
Collection and never removed), the number of Surviving Generations grows and that's exactly what the Surviving Generations metrics is able to detect regardless of how much memory is wasted by such a leak.