Skip to content

Commit

Permalink
Dispose when restart
Browse files Browse the repository at this point in the history
  • Loading branch information
bao-qian committed May 8, 2016
1 parent 644bd37 commit f01075a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Wox/PublicAPIInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public void CloseApp()

public void RestarApp()
{
// we must force dispose application
// UpdateManager.RestartApp() will call Environment.Exit(0)
// which will cause ungraceful exit
((IDisposable) Application.Current).Dispose();
UpdateManager.RestartApp();
}

Expand Down

0 comments on commit f01075a

Please sign in to comment.