mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
Better mutex cleanup
This commit is contained in:
parent
5bb90828f8
commit
a8c6a97579
@ -302,11 +302,7 @@ namespace Wox.Helper
|
||||
/// </summary>
|
||||
public static void Cleanup()
|
||||
{
|
||||
if (singleInstanceMutex != null)
|
||||
{
|
||||
singleInstanceMutex.Close();
|
||||
singleInstanceMutex = null;
|
||||
}
|
||||
singleInstanceMutex?.ReleaseMutex();
|
||||
|
||||
if (channel != null)
|
||||
{
|
||||
|
@ -80,7 +80,6 @@ namespace Wox
|
||||
|
||||
public void CloseApp()
|
||||
{
|
||||
SingleInstance<App>.singleInstanceMutex.ReleaseMutex();
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user