protected override void Dispose(bool disposing) { if (disposing) { var nativeCell = Body.GetChildAt(0); nativeCell?.Dispose(); Border?.Dispose(); Border = null; Body?.Dispose(); Body = null; ItemView.SetOnClickListener(null); } base.Dispose(disposing); }
/// <summary> /// Disposes resources /// </summary> public override void Dispose() { if (Picture != null) { Picture.Dispose(); } Picture = null; if (Border != null) { Border.Dispose(); } Border = null; }
protected override void Dispose(bool disposing) { if (disposing) { var nativeCell = Body.GetChildAt(0); if (nativeCell is INativeElementView nativeElementView) { // If a ViewCell is used, it stops the ViewCellContainer from executing the dispose method. // Because if the AiForms.Effects is used and a ViewCellContainer is disposed, it crashes. if (!(nativeElementView.Element is ViewCell)) { nativeCell?.Dispose(); } } Border?.Dispose(); Border = null; Body?.Dispose(); Body = null; ItemView.SetOnClickListener(null); } base.Dispose(disposing); }
public virtual void SetInactive() { border.Dispose(); border = null; }
public override void Dispose() { _background.Dispose(); Border.Dispose(); base.Dispose(); }