Resolves issue 290: InAppBrowser will not destroy WebView after being closed (by invoking ref.close()) causing memory leaks
This commit is contained in:
parent
8ee1d38821
commit
e899cc3f09
@ -536,6 +536,14 @@ public class InAppBrowser extends CordovaPlugin {
|
||||
dialog.dismiss();
|
||||
dialog = null;
|
||||
}
|
||||
|
||||
if (url.equals(new String("about:blank"))) {
|
||||
inAppWebView.onPause();
|
||||
inAppWebView.removeAllViews();
|
||||
inAppWebView.destroyDrawingCache();
|
||||
inAppWebView.destroy();
|
||||
inAppWebView = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
// NB: From SDK 19: "If you call methods on WebView from any thread
|
||||
|
Loading…
Reference in New Issue
Block a user