Detach static event handler before exiting
I hope this is the last one. Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
@@ -172,6 +172,8 @@ namespace Shadowsocks
|
||||
|
||||
private static void Application_ApplicationExit(object sender, EventArgs e)
|
||||
{
|
||||
// detach static event handlers
|
||||
Application.ApplicationExit -= Application_ApplicationExit;
|
||||
SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
|
||||
Application.ThreadException -= Application_ThreadException;
|
||||
HotKeys.Destroy();
|
||||
|
||||
Reference in New Issue
Block a user