mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 12:09:18 +08:00
Better mutex cleanup
This commit is contained in:
parent
5bb90828f8
commit
a8c6a97579
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,6 @@ namespace Wox
|
|||||||
|
|
||||||
public void CloseApp()
|
public void CloseApp()
|
||||||
{
|
{
|
||||||
SingleInstance<App>.singleInstanceMutex.ReleaseMutex();
|
|
||||||
Application.Current.Shutdown();
|
Application.Current.Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user