mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
Better mutex cleanup
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user