/// <summary> /// Dispose the specified disposing. /// </summary> /// <returns>The dispose.</returns> /// <param name="disposing">If set to <c>true</c> disposing.</param> protected override void Dispose(bool disposing) { if (disposing) { CellBase.PropertyChanged -= CellPropertyChanged; CellParent.PropertyChanged -= ParentPropertyChanged; if (CellBase.Section != null) { CellBase.Section.PropertyChanged -= SectionPropertyChanged; CellBase.Section = null; } SelectedBackgroundView?.Dispose(); SelectedBackgroundView = null; Device.BeginInvokeOnMainThread(() => { HintLabel.RemoveFromSuperview(); HintLabel.Dispose(); HintLabel = null; TitleLabel?.Dispose(); TitleLabel = null; DescriptionLabel?.Dispose(); DescriptionLabel = null; IconView.RemoveFromSuperview(); IconView.Image?.Dispose(); IconView.Dispose(); IconView = null; _iconTokenSource?.Dispose(); _iconTokenSource = null; _iconConstraintWidth?.Dispose(); _iconConstraintHeight?.Dispose(); _iconConstraintHeight = null; _iconConstraintWidth = null; ContentStack?.RemoveFromSuperview(); ContentStack?.Dispose(); ContentStack = null; Cell = null; StackV?.RemoveFromSuperview(); StackV?.Dispose(); StackV = null; StackH.RemoveFromSuperview(); StackH.Dispose(); StackH = null; } ); } base.Dispose(disposing); }
void ReleaseDesignerOutlets() { if (ControlsOverlay != null) { ControlsOverlay.Dispose(); ControlsOverlay = null; } if (FinishRoundButton != null) { FinishRoundButton.Dispose(); FinishRoundButton = null; } if (HintLabel != null) { HintLabel.Dispose(); HintLabel = null; } if (OverlayView != null) { OverlayView.Dispose(); OverlayView = null; } if (PlayerOnePlayerNameLabel != null) { PlayerOnePlayerNameLabel.Dispose(); PlayerOnePlayerNameLabel = null; } if (PlayerOneProfilePictureImage != null) { PlayerOneProfilePictureImage.Dispose(); PlayerOneProfilePictureImage = null; } if (PlayerOneTimeElapsed != null) { PlayerOneTimeElapsed.Dispose(); PlayerOneTimeElapsed = null; } if (PlayerOneViewContainer != null) { PlayerOneViewContainer.Dispose(); PlayerOneViewContainer = null; } if (PlayerTwoPlayerNameLabel != null) { PlayerTwoPlayerNameLabel.Dispose(); PlayerTwoPlayerNameLabel = null; } if (PlayerTwoProfilePictureImage != null) { PlayerTwoProfilePictureImage.Dispose(); PlayerTwoProfilePictureImage = null; } if (PlayerTwoTimeElapsed != null) { PlayerTwoTimeElapsed.Dispose(); PlayerTwoTimeElapsed = null; } if (PlayerTwoViewContainer != null) { PlayerTwoViewContainer.Dispose(); PlayerTwoViewContainer = null; } }