public override void Dispose() { if (webView != null) { webView.StopLoading(); var localWebView = webView; Application.InvokeOnMainThread(() => { localWebView.RemoveFromSuperview(); // RemoveFromSuperview must run in main thread only. localWebView.Dispose(); }); webView = null; } }
public override void Dispose() { if (activityIndicator != null) { if (isActivityIndicatorVisible) { activityIndicator.RemoveFromSuperview(); isActivityIndicatorVisible = false; } activityIndicator.Dispose(); activityIndicator = null; } if (webView != null) { webView.StopLoading(); //webView.Delegate = null; var localWebView = webView; Application.InvokeOnMainThread(() => { localWebView.RemoveFromSuperview(); // RemoveFromSuperview must run in main thread only. localWebView.Dispose(); }); webView = null; } }