Javafx memory leak issue
Dhruvi Vaza
dhruvi.vaza at ecosmob.com
Fri Aug 31 13:53:48 UTC 2018
Hello,
I am using javafx webview in my desktop application to load a url. I am
opening webview on dialog. When I press a button to open a dialog
containing webview. I get memory leak issue. sometimes it leads to crashing
of application.
Please give me proper solution.
*The below code I have used:*
public class HelpDialogController {
@FXML
private BorderPane helpDialogMainBorderPane;
@FXML
private WebView helpDialogWebView;
public WebEngine webEngine;
public static HelpDialogController instance;
/**
* Initializes the controller class.
*/
@FXML
public void initialize() {
// TODO
instance = this;
webEngine = helpDialogWebView.getEngine();
webEngine.load("https://csgpay.com/support?mobile_app=true");
webEngine.setJavaScriptEnabled(true);
// Delete cookies
java.net.CookieHandler.setDefault(new java.net.CookieManager());
}
--
Thanks & Regards,
Dhruvi Vaza
Jr. Software Developer
Ecosmob Technologies Pvt. Ltd.
More information about the openjfx-dev
mailing list