diff options
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs b/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs index e32e86cd..b42f69f4 100644 --- a/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs +++ b/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs @@ -7,8 +7,8 @@ namespace Xamarin.Forms.Platform.iOS public class CellTableViewCell : UITableViewCell, INativeElementView { Cell _cell; - public Action<object, PropertyChangedEventArgs> PropertyChanged; + bool _disposed; public CellTableViewCell(UITableViewCellStyle style, string key) : base(style, key) { @@ -95,5 +95,21 @@ namespace Xamarin.Forms.Platform.iOS return nativeCell; } + + protected override void Dispose(bool disposing) + { + if (_disposed) + return; + + if (disposing) + { + PropertyChanged = null; + _cell = null; + } + + _disposed = true; + + base.Dispose(disposing); + } } }
\ No newline at end of file |