Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: javafx
    • Environment:

      Win7 Java 8b106

      Description

      Execute the test below - when the scrollpane is removed it's still referenced so it can't get GC'd.

      public class ScrollPaneMemoryLeakTest extends Application
      {
        private MyScrollPane myPane;
        
        public static void main(String[] args)
        {
          Application.launch(args);
        }

        @Override
        public void start(Stage stage)
        {
          final FlowPane root = new FlowPane(10, 10);
          
          myPane = new MyScrollPane();
          root.getChildren().add(myPane);
          
          Button b = new Button("Remove Pane");
          b.setOnAction(new EventHandler<ActionEvent>()
          {
            @Override
            public void handle(ActionEvent event)
            {
              root.getChildren().remove(myPane);
              myPane = null;
            }
          });
          root.getChildren().add(b);
          
          Scene scene = new Scene(root, 800, 600);
          stage.setScene(scene);
          stage.show();
        }

        private static class MyScrollPane extends ScrollPane
        {
        }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                miflemi Mick Fleming (Inactive)
                Reporter:
                wzberger Wolfgang Zitzelsberger
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: