fix: Fix for potential memory leak with timers

This commit is contained in:
Chris Cameron
2019-01-21 11:49:21 -05:00
parent aae4fb6185
commit e708ef9603

View File

@@ -20,7 +20,7 @@ namespace ICD.Common.Utils.Timers
private readonly Timer m_Timer;
private int m_RepeatPeriod;
#endif
private readonly Action m_Callback;
private Action m_Callback;
/// <summary>
/// Returns true if this instance has been disposed.
@@ -88,6 +88,8 @@ namespace ICD.Common.Utils.Timers
Stop();
m_Timer.Dispose();
m_Callback = null;
IsDisposed = true;
}