protected override void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { (this as IDisconnectable).Disconnect(); _events?.Dispose(); _packager?.Dispose(); _tracker?.Dispose(); _events = null; _packager = null; _tracker = null; Element = null; Container?.Dispose(); _pageContainer = null; } _disposed = true; base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (_packager == null) { return; } Element?.ClearValue(Platform.RendererProperty); SetElement(null); _packager.Dispose(); _packager = null; _tracker.NativeControlUpdated -= OnNativeControlUpdated; _tracker.Dispose(); _tracker = null; _events.Dispose(); _events = null; _insetTracker.Dispose(); _insetTracker = null; ScrollAnimationEnded -= HandleScrollAnimationEnded; Scrolled -= HandleScrolled; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if ((_flags & VisualElementRendererFlags.Disposed) != 0) { return; } _flags |= VisualElementRendererFlags.Disposed; if (disposing) { if (_events != null) { _events.Dispose(); _events = null; } if (_tracker != null) { _tracker.Dispose(); _tracker = null; } if (_packager != null) { _packager.Dispose(); _packager = null; } Platform.SetRenderer(Element, null); SetElement(null); Element = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (!_disposed && disposing) { if (Element != null) { ((Page)Element).SendDisappearing(); Element.PropertyChanged -= HandlePropertyChanged; Element = null; } if (_tracker != null) { _tracker.Dispose(); _tracker = null; } if (_events != null) { _events.Dispose(); _events = null; } if (_masterController != null) { _masterController.WillAppear -= MasterControllerWillAppear; _masterController.WillDisappear -= MasterControllerWillDisappear; } _disposed = true; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing && !_disposed) { _previousPage = null; if (_scrollView != null) { _scrollView.DecelerationEnded -= OnDecelerationEnded; } if (Carousel != null) { Carousel.PropertyChanged -= OnPropertyChanged; Carousel.PagesChanged -= OnPagesChanged; } Platform.SetRenderer(Element, null); Clear(); if (_scrollView != null) { _scrollView.DecelerationEnded -= OnDecelerationEnded; _scrollView.RemoveFromSuperview(); _scrollView = null; } if (_appeared) { _appeared = false; PageController?.SendDisappearing(); } if (_events != null) { _events.Dispose(); _events = null; } if (_tracker != null) { _tracker.Dispose(); _tracker = null; } Element = null; _disposed = true; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { if (_shellSection != null) { ((IShellSectionController)_shellSection).RemoveContentInsetObserver(this); _shellSection = null; } Element.PropertyChanged -= OnHandlePropertyChanged; Platform.SetRenderer(Element, null); if (_appeared) { Page.SendDisappearing(); } _appeared = false; if (_events != null) { _events.Dispose(); _events = null; } if (_packager != null) { _packager.Dispose(); _packager = null; } if (_tracker != null) { _tracker.Dispose(); _tracker = null; } Element = null; Container?.Dispose(); _pageContainer = null; } _disposed = true; base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } _disposed = true; if (disposing) { if (Element != null) { PageController.SendDisappearing(); Element.PropertyChanged -= HandlePropertyChanged; if (FlyoutPage?.Flyout != null) { FlyoutPage.Flyout.PropertyChanged -= HandleFlyoutPropertyChanged; } Element = null; } if (_tracker != null) { _tracker.Dispose(); _tracker = null; } if (_events != null) { _events.Dispose(); _events = null; } if (_flyoutController != null) { _flyoutController.DidAppear -= FlyoutControllerDidAppear; _flyoutController.WillDisappear -= FlyoutControllerWillDisappear; } ClearControllers(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } _disposed = true; if (disposing) { if (Element != null) { PageController.SendDisappearing(); Element.PropertyChanged -= HandlePropertyChanged; if (MasterDetailPage?.Master != null) { MasterDetailPage.Master.PropertyChanged -= HandleMasterPropertyChanged; } Element = null; } if (_tracker != null) { _tracker.Dispose(); _tracker = null; } if (_events != null) { _events.Dispose(); _events = null; } if (_masterController != null) { _masterController.WillAppear -= MasterControllerWillAppear; _masterController.WillDisappear -= MasterControllerWillDisappear; } ClearControllers(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing && !_disposed) { Element.SizeChanged -= PageOnSizeChanged; Element.PropertyChanged -= HandlePropertyChanged; if (_tracker != null) { _tracker.Dispose(); _tracker = null; } if (_events != null) { _events.Dispose(); _events = null; } if (_tapGesture != null) { if (_clickOffView != null && _clickOffView.GestureRecognizers.Contains(_tapGesture)) { _clickOffView.GestureRecognizers.Remove(_tapGesture); _clickOffView.Dispose(); } _tapGesture.Dispose(); } if (_panGesture != null) { if (View != null && View.GestureRecognizers.Contains(_panGesture)) { View.GestureRecognizers.Remove(_panGesture); } _panGesture.Dispose(); } EmptyContainers(); Page.SendDisappearing(); _disposed = true; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } _disposed = true; if (Interlocked.Decrement(ref _sharedPoolCount) == 0 && Forms.IsiOS12OrNewer) { _sharedPool = null; } if (disposing) { if (IsLoading) { StopLoading(); } Element.PropertyChanged -= HandlePropertyChanged; WebView.EvalRequested -= OnEvalRequested; WebView.EvaluateJavaScriptRequested -= OnEvaluateJavaScriptRequested; WebView.GoBackRequested -= OnGoBackRequested; WebView.GoForwardRequested -= OnGoForwardRequested; WebView.ReloadRequested -= OnReloadRequested; Element?.ClearValue(Platform.RendererProperty); SetElement(null); _events?.Dispose(); _tracker?.Dispose(); _packager?.Dispose(); _events = null; _tracker = null; _events = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing && !_disposed) { Element.PropertyChanged -= OnHandlePropertyChanged; Platform.SetRenderer(Element, null); if (_appeared) { Page.SendDisappearing(); } _appeared = false; if (_events != null) { _events.Dispose(); _events = null; } if (_packager != null) { _packager.Dispose(); _packager = null; } if (_tracker != null) { _tracker.Dispose(); _tracker = null; } Element = null; Container?.Dispose(); _pageContainer = null; _disposed = true; } base.Dispose(disposing); }