Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4506928

Memory leak caused by java.awt.FileDialog

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.3.1_05
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      05
    • CPU:
      x86
    • OS:
      windows_2000

      Backports

        Description



        Name: nt126004 Date: 09/25/2001


        java version "1.4.0-beta"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
        Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

        This bug occurs in HotSpot and Classic modes. It also appears in at least the
        following versions:



        Steps to reproduce:

        1. Create a java.awt.FileDialog.
        2. Show it.
        3. Close it.
        4. Garbage collect many times.

        The FileDialog is never garbage collected. It is being held by two JNI
        references. When these steps are repeated, additional FileDialog objects are
        leaked.

        The memory leak of the FileDialog object itself is not too severe, however it
        holds a reference to its parent Frame which is probably using much more memory.
        This leak was causing our application to leak several megabytes of heap per
        occurrence.

        I can provide you with a simple NetBeans project that demonstrates this leak
        and an OptimizeIt snapshot that shows the JNI references that are preventing
        garbage collection of the FileDialog objects and their parents.
        (Review ID: 132073)
        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                asultano Alex Sultanov
                Reporter:
                nthompsosunw Nathanael Thompson (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: