From 6b2a69d930d42657aff2b9ad769503b4939568ab Mon Sep 17 00:00:00 2001 From: adrianknight89 Date: Thu, 26 Jan 2017 08:24:31 -0600 Subject: [iOS/Critical] Fix ListView memory leaks (#524) * fix memory leaks added sample code changed page name Changed page title add screen instructions fix copy paste error change subview dispose logic Fix context action memory leak add sample code change custom page names Revert "change custom page names" This reverts commit 7aaab2625d9526080ca5c51c02e909f09ee3f610. changed class names changes UI test for 32206 update ui test fix whitespace UITests done * run UI tests on iOS only * fix code style * dispose prototype * fix child renderer issue * add null check --- Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs') 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 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 -- cgit v1.2.3