The solution is to call the garbage collector & force the Windows OS to clean the memory. For example into finally you can write :
finally
{
GC.Collect();
GC.WaitForPendingFinalizers();
EmptyWorkingSet(GetCurrentProcess());
}
EmptyWorkingSet
forces the OS to clean the memory.