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

HTMLEditor Memory Leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u9
    • javafx
    • Windows 7 64bit
      JDK 7u9 32bit

    • web

      HTMLEditor has a major memory leak:

      import javafx.application.Application;
      import javafx.scene.web.HTMLEditor;
      import javafx.stage.Stage;

      public class JavaFxTest2 extends Application {
      public void printMem() {
      Runtime runtime = Runtime.getRuntime();
      long usedMemory = runtime.totalMemory() - runtime.freeMemory();
      System.out.println(""+usedMemory);
      }
      public void start(final Stage stage) {
      for (int i=0;i<100;i++) {
      HTMLEditor h = new HTMLEditor();
      if (i%10==0) {
      System.gc();
      printMem();
      }
      }
      }
      public static void main(String[] args) {
      Application.launch(args);
      }
      }

      Gives the following output:

      2595080
      8698824
      14885992
      20936536
      27121272
      33307720
      39492520
      45562200
      51748120
      57934616

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: