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

Memoryleak in TableView - column headers accumulate in memory forever

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u45
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      Oracle JDK 1.7.45, Ubuntu 13.04

      Description

      When a table column is hidden and shown again, or removed and added again, it consumes a few additional kilobytes of memory for each such step. It leaves there forever some invalidation listeners that keep references to nodes and styles, etc from the table header.

      See the attached example. It creates the simplest possible table with two columns and periodically hides and un-hides one column. The memory keeps growing and javafx.scene.control.TableColumn$6 soon contains thousands of forgotten invalidation listeners.

      This causes a serious problem in our real-life application when columns get often added/removed/hidden/shown based on asynchronous events.

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              jmarekjfx Jan Marek (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: