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

Swing holds Component in static variable prevents AppContext to gc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • beta2
    • x86
    • windows_nt

      In Merlin, implementation of several classes in javax.swing has static variables of java.awt.Component:

      javax.swing.ImageIcon - uses component
      javax.swing.plat.basic.BasicComboBoxUI - use DefaultListCellRenderer

      Because each component bounds to an app context, the component that is stored in the static variables in Swing class will bounded to the app context of the loader. If the loader goes away, the app context will never get GC because it is cached in Swing.

            svioletsunw Scott Violet (Inactive)
            stanleyh Stanley Ho (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: