private void Window_Closing(object sender, CancelEventArgs e)
{
bgw?.CancelAsync();
GC.Collect();
GC.WaitForPendingFinalizers();
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
BExplorer.Shell.Interop.Shell32.SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
}
}
}