Skip to content

Commit

Permalink
Merge pull request JanKallman#149 from FROCHE38/patch-1
Browse files Browse the repository at this point in the history
Bug Fix: ExcelWorksheets.Dispose with some application
  • Loading branch information
JanKallman authored Mar 4, 2018
2 parents d0f364b + bec6122 commit 02eaec6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions EPPlus/ExcelWorksheets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,13 +1261,16 @@ private void MoveSheetXmlNode(ExcelWorksheet sourceSheet, ExcelWorksheet targetS

#endregion
public void Dispose()
{
foreach (var sheet in this._worksheets.Values)
{
((IDisposable)sheet).Dispose();
}
_worksheets = null;
_pck = null;
{
if (_worksheets != null)
{
foreach (var sheet in this._worksheets.Values)
{
((IDisposable)sheet).Dispose();
}
_worksheets = null;
_pck = null;
}
}
} // end class Worksheets
}

0 comments on commit 02eaec6

Please sign in to comment.