Memory leak in test suite properties dialog

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • jt4.4.1
    • Affects Version/s: jt4.4
    • Component/s: tools
    • None
    • b06
    • x86
    • generic
    • Not verified

      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.

            Assignee:
            Brian Kurotsuchi (Inactive)
            Reporter:
            Vladimir Sizikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: