fix(core): improve loaded/unloaded handling

This commit is contained in:
Nathan Walker
2023-01-16 11:41:04 -08:00
parent c9e29aa9af
commit 18b911ed84
17 changed files with 57 additions and 28 deletions

View File

@ -123,10 +123,12 @@ export class WebView extends WebViewBase {
public disposeNativeView() {
const nativeView = this.nativeViewProtected;
if (nativeView) {
if ((<any>nativeView).client) {
(<any>nativeView).client.owner = null;
}
nativeView.destroy();
}
(<any>nativeView).client.owner = null;
super.disposeNativeView();
}

View File

@ -208,10 +208,10 @@ export class WebView extends WebViewBase {
}
disposeNativeView() {
super.disposeNativeView();
this._delegate = null;
this._scrollDelegate = null;
this._uiDelegate = null;
super.disposeNativeView();
}
// @ts-ignore