summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2017-01-26 08:24:31 -0600
committerRui Marinho <me@ruimarinho.net>2017-01-26 14:24:31 +0000
commit6b2a69d930d42657aff2b9ad769503b4939568ab (patch)
treee0b98e6ee63c0161a7e9cee69f285661e1685fb5 /Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs
parent6670ca58458582a1a670f97d17958220802f84b0 (diff)
downloadxamarin-forms-6b2a69d930d42657aff2b9ad769503b4939568ab.tar.gz
xamarin-forms-6b2a69d930d42657aff2b9ad769503b4939568ab.tar.bz2
xamarin-forms-6b2a69d930d42657aff2b9ad769503b4939568ab.zip
[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
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs')
-rw-r--r--Xamarin.Forms.Platform.iOS/Cells/CellTableViewCell.cs18
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