You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/10/29 09:55:41 UTC
[GitHub] [cordova-plugin-inappbrowser] HarshRohila commented on issue #290:
InAppBrowser will not destroy WebView after being closed (by invoking
ref.close()) causing memory leaks
HarshRohila commented on issue #290: InAppBrowser will not destroy WebView after being closed (by invoking ref.close()) causing memory leaks
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/290#issuecomment-547342132
```childView.setWebViewClient(new WebViewClient() {
// NB: wait for about:blank before dismissing
public void onPageFinished(WebView view, String url) {
if (dialog != null) {
dialog.dismiss();
dialog = null;
}
if (url.equals(new String("about:blank"))) {
inAppWebView.onPause();
inAppWebView.removeAllViews();
inAppWebView.destroyDrawingCache();
inAppWebView.destroy();
inAppWebView = null;
}
}
});
```
Above worked for me
Reference: robinson29a's comment
https://stackoverflow.com/questions/17418503/destroy-webview-in-android/17458577 (following steps from here to close webview)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org