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

Memory leak: CSS style sheets defined on Parent not released when Parent goes out of scope

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 8
    • 7u10
    • javafx
    • Mac OSX 10.7.5 (8GB RAM); JDK 1.7.0_11; JavaFX 2.2.4-b19.

      If a Parent has an attached css stylesheet, and is removed from the scene graph, resources associated with the stylesheet are not released, creating a memory leak.

      This relates to the discussion on the OTN forum: https://forums.oracle.com/forums/thread.jspa?threadID=2485338&tstart=0
      I created a simple test case which repeatedly reloads an FXML file, attaches a simple stylesheet, and sets the resulting Parent as the center of a BorderPane. With the maximum memory ~1GB this fails after about 7000 iterations (takes ~10-15 minutes). The original post on OTN, which involved a more complex scene graph and more complex css, claimed failure in ~30-40 reloads.

            dgrieve David Grieve
            jdenvirjfx James Denvir (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: