Torrey’s Blog

My Application Development Ramblings

Memory Leaks Cleanup Roto Rooter Style Snippet

June5

This could be one of the most useful snippets know to man kind. Shove this bad boy into a timer that executes every so many minutes or after loading up some datasets.

  try
  {
     Process process = Process.GetCurrentProcess();
     process.MaxWorkingSet = process.MaxWorkingSet;
     process.Dispose();
  }
  catch { }
posted under C#

You must be logged in to post a comment.