Merge pull request #8416 from ivandrofly/feature/se-listview-dispose

Add Dispose method to SubtitleListView control
This commit is contained in:
Nikolaj Olsson 2024-06-05 07:03:06 +02:00 committed by GitHub
commit 24de4b2e5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2384,5 +2384,23 @@ namespace Nikse.SubtitleEdit.Controls
EndUpdate();
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
{
// unhook handler
_setLastColumnWidthTimer.Tick -= SetLastColumnWidthTimer_Tick;
_syntaxColorLineTimer.Tick -= SyntaxColorLineTimerTick;
_setStartAndDurationTimer.Tick -= SetStartAndDurationTimerTick;
// dispose timers
_setLastColumnWidthTimer.Dispose();
_syntaxColorLineTimer.Dispose();
_setStartAndDurationTimer.Dispose();
}
}
}
}