Open any test suite in JavaTest, then View -> Properties. Close the dialog and the test suite.
Still, the whole test suite is retained in the memory due to improper cleanup in the ToolDialog.
Here's the proof (from JHat tool):
--> sun.awt.windows.WDialogPeer@0x4a9e670 (157 bytes) (field target:)
--> javax.swing.JDialog@0x4a9c6f0 (426 bytes) (field windowListener:)
--> com.sun.javatest.tool.ToolDialog$2@0x4aabf38 (12 bytes) (field this$0:)
--> com.sun.javatest.exec.PropertiesBrowser@0x4a4c9a0 (100 bytes) (field testSuite:)
--> com.sun.tck.msa.javatest.MSATestSuite@0x152abda0 (115 bytes)
So, the JDialog is not properly disposed and it keeps the reference to the test suite via its listener.
Attached patch fixes the problem for me.
Still, the whole test suite is retained in the memory due to improper cleanup in the ToolDialog.
Here's the proof (from JHat tool):
--> sun.awt.windows.WDialogPeer@0x4a9e670 (157 bytes) (field target:)
--> javax.swing.JDialog@0x4a9c6f0 (426 bytes) (field windowListener:)
--> com.sun.javatest.tool.ToolDialog$2@0x4aabf38 (12 bytes) (field this$0:)
--> com.sun.javatest.exec.PropertiesBrowser@0x4a4c9a0 (100 bytes) (field testSuite:)
--> com.sun.tck.msa.javatest.MSATestSuite@0x152abda0 (115 bytes)
So, the JDialog is not properly disposed and it keeps the reference to the test suite via its listener.
Attached patch fixes the problem for me.