From dc0a89beedfc3ed944d5dfa14ee4d7e75cc104d0 Mon Sep 17 00:00:00 2001 From: Adam Essenmacher Date: Sat, 20 Jan 2024 01:35:30 -0500 Subject: [PATCH] Fixes iOS memory leak. --- .../Platforms/iOS/Renderers/CollectionViewRenderer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maui/Sharpnado.CollectionView.Maui/Platforms/iOS/Renderers/CollectionViewRenderer.cs b/Maui/Sharpnado.CollectionView.Maui/Platforms/iOS/Renderers/CollectionViewRenderer.cs index ade8162..69d01d5 100644 --- a/Maui/Sharpnado.CollectionView.Maui/Platforms/iOS/Renderers/CollectionViewRenderer.cs +++ b/Maui/Sharpnado.CollectionView.Maui/Platforms/iOS/Renderers/CollectionViewRenderer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; @@ -144,10 +144,10 @@ private void CleanUp() { if (_collectionView != null) { - _collectionView.Dispose(); _collectionView.DataSource?.Dispose(); _collectionView.CollectionViewLayout?.Dispose(); _collectionView.Delegate?.Dispose(); + _collectionView.Dispose(); _collectionView = null; }