Java Memory Leak: WDialogPeer is the only strong reference - why wont it GC?

357 views Asked by At

I'm doing some profiling on a legacy Java product and hunting down memory leaks using YourKit. I'm plugging quite a lot - but I keep coming across an issue that I just cannot solve.

I have quite a few windows/dialogs that when I close them (and call dispose in the case where they derive from JDialog) they just aren't being GC'd. YourKit reports that the only root to the GC is "target of sun.awt.windows.WDialogPeer [JNI Global]". There are some weak references too which seem to mostly come from MetalToolBarUI. Presubably these only exist because of this one strong reference from WDialogPeer.

Has anyone seen this before - or can anyone give me an idea how and or/why WDialogPeer is holding onto my JDialogs/JFrames? How can I clean it up?

0

There are 0 answers