I tried to create a user interface using webview in JavaFX, but there is one problem: when opening a large image using a pop-up, the memory usage is very large, and when the pop-up is closed, the memory usage does not drop, I see the memory usage through the Task Manager in Windows,
when an image with a size of about 8 MB was opened using web browsing, the memory reached 300 MB, I donβt understand why it is so big,
I tried
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
public void handle(WindowEvent event) {
webengine.load(null);
}
});
but still do not free up memory
source
share