Exemplo n.º 1
0
 private void manualMemoryclean(object sender, RoutedEventArgs e)
 {
     Process[] allProcesses = Process.GetProcessesByName("Client");
     if (allProcesses.Count() >= 0)
     {
         foreach (var process in allProcesses)
         {
             try
             {
                 PoormanCleaner.EmptyWorkingSet(process.Handle);
             }
             catch (Exception) { }
         }
     }
 }
Exemplo n.º 2
0
        private void dispatchTimer_tick(object sender, EventArgs e)
        {
            DispatcherTimer timer = (DispatcherTimer)sender;

            Debug.WriteLine("Cleaning Memory...");
            Process[] allProcesses = Process.GetProcessesByName("Client");
            if (allProcesses.Count() >= 0)
            {
                foreach (var process in allProcesses)
                {
                    try
                    {
                        PoormanCleaner.EmptyWorkingSet(process.Handle);
                    }
                    catch (Exception) { }
                }
            }
        }
Exemplo n.º 3
0
 private void LAUNCHER_CLICK(object sender, RoutedEventArgs e)
 {
     PoormanCleaner.EmptyWorkingSet(Process.GetCurrentProcess().Handle);
     setCurrentPage("Launcher");
 }