-
Bug
-
Resolution: Duplicate
-
P4
-
7-pool, 8u40
-
MacOS 10.6 + 64bit JDK
I've found this bug while investigating a leak in the Browser demo. Below is a minimized test. To reproduce, I ran the test under profiler and selected tabs one by one. On each tab I clicked into the text field and typed a few letters into it. Then I closed all tabs except Tab0, and created a heap dump (attached as TextFieldLeak.hprof).
The dump shows five TextField objects (there should be only one), three of them are referenced from QuantumToolkit.animationRunnable. I suppose this may be related to the blinking caret.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
public class Test extends Application {
@Override public void start(Stage stage) {
TabPane tabs = new TabPane();
for (int i=0; i<5; i++) {
TextField field = new TextField("Field" + i);
Tab tab = new Tab("Tab" + i);
tab.setContent(field);
tabs.getTabs().add(tab);
}
stage.setScene(new Scene(tabs));
stage.sizeToScene();
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
The dump shows five TextField objects (there should be only one), three of them are referenced from QuantumToolkit.animationRunnable. I suppose this may be related to the blinking caret.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
public class Test extends Application {
@Override public void start(Stage stage) {
TabPane tabs = new TabPane();
for (int i=0; i<5; i++) {
TextField field = new TextField("Field" + i);
Tab tab = new Tab("Tab" + i);
tab.setContent(field);
tabs.getTabs().add(tab);
}
stage.setScene(new Scene(tabs));
stage.sizeToScene();
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
- duplicates
-
JDK-8096912 [TabPane] TableView in TabPane has memory leak
- Resolved
- relates to
-
JDK-8117451 TextField: memory leak
- Closed
-
JDK-8116278 Leak in TabPane's tabs menu
- Closed