Better mutex cleanup

This commit is contained in:
bao-qian 2015-11-29 05:14:56 +00:00
parent 5bb90828f8
commit a8c6a97579
2 changed files with 1 additions and 6 deletions

View File

@ -302,11 +302,7 @@ namespace Wox.Helper
/// </summary> /// </summary>
public static void Cleanup() public static void Cleanup()
{ {
if (singleInstanceMutex != null) singleInstanceMutex?.ReleaseMutex();
{
singleInstanceMutex.Close();
singleInstanceMutex = null;
}
if (channel != null) if (channel != null)
{ {

View File

@ -80,7 +80,6 @@ namespace Wox
public void CloseApp() public void CloseApp()
{ {
SingleInstance<App>.singleInstanceMutex.ReleaseMutex();
Application.Current.Shutdown(); Application.Current.Shutdown();
} }