Swing Drag and Drop can prevent a component from being GC'd

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P3
    • 6-pool
    • Affects Version/s: 6
    • Component/s: client-libs
    • None

      I've got a weird problem with drag and drop in Java 1.6.0_03. If I use drag and drop to move nodes around in a tree, there are references kept to my view, keeping it from being GC'ed. I repeatedly tested this with a profiler, and without dragging the view is GC'ed. Once dragged/dropped there are stuck references. I would really like some tips on this.

      The only thing I do is subclass TransferHandler that overrides various methods like createTransferable( JComponent), canImport( TransferSupport) and importData(TransferSupport).

      This is the most puzzling path to one of the GC roots:
      MyApplication-> MyDesktopPane -> javax.swing.JEditorPane -> javax.swing.TransferHandler$SwingDropTarget -> javax.swing.TramsferHandler$DropHandler -> javax.swing.TransferHandler$TransferSupport -> my tree

      My application has a JDesktopPane, which holds a JEditorPane to show some news from our website. This component has NOTHING to do with that tree whatsoever. That tree is in an MDI view.

            Assignee:
            Unassigned
            Reporter:
            Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: