diff --git a/src/EPPlus/Core/CellStore/CellStore.cs b/src/EPPlus/Core/CellStore/CellStore.cs index 1d86c8986..d75c1312c 100644 --- a/src/EPPlus/Core/CellStore/CellStore.cs +++ b/src/EPPlus/Core/CellStore/CellStore.cs @@ -62,10 +62,6 @@ public CellStore() { _columnIndex = new ColumnIndex[CellStoreSettings.ColSizeMin]; } - ~CellStore() - { - _columnIndex = null; - } internal bool HasValues { get diff --git a/src/EPPlus/Core/CellStore/ColumnIndex.cs b/src/EPPlus/Core/CellStore/ColumnIndex.cs index 2339a34d7..734fc2915 100644 --- a/src/EPPlus/Core/CellStore/ColumnIndex.cs +++ b/src/EPPlus/Core/CellStore/ColumnIndex.cs @@ -27,10 +27,6 @@ public ColumnIndex() _pages = new PageIndex[CellStoreSettings.PagesPerColumnMin]; PageCount = 0; } - ~ColumnIndex() - { - _pages = null; - } internal int GetPagePosition(int Row) { var page = (Row >> CellStoreSettings._pageBits); @@ -274,7 +270,11 @@ public void Dispose() (_pages[p] as IDisposable)?.Dispose(); } _pages = null; - if (_values != null) _values.Clear(); + if (_values != null) + { + _values.Clear(); + _values = null; + } } } } \ No newline at end of file diff --git a/src/EPPlus/Core/CellStore/PageIndex.cs b/src/EPPlus/Core/CellStore/PageIndex.cs index fbbbdca24..4fadaa743 100644 --- a/src/EPPlus/Core/CellStore/PageIndex.cs +++ b/src/EPPlus/Core/CellStore/PageIndex.cs @@ -45,10 +45,6 @@ public PageIndex(PageIndex pageItem, int start, int size, short index, int offse Index = index; Offset = offset; } - ~PageIndex() - { - Rows = null; - } internal int Offset = 0; /// /// Rows in the rows collection.