I am using jProfiler to find memory leaks in a Java swing application. I have identified instances of a JFrame which keeps growing in count.
This frame is opened, an
I had this exact problem when fixing memory leaks in a JavaFX application. In the end the problem turned out to be that i was running the application in debug mode and had several breakpoints in the code. This seems to have caused objects to be 'JNI Global reference' and being kept in memory without apparent reason. When i turned off the debug mode everything worked as it should!