in reply to Clearing memory
I've had similar problems. It seemed like the 5-10 minute wait couldn't be due to normal processing time. I never figured it out, but in my case memory consumption skyrocketed and virtual memory was automatically increased, so maybe the slowness of using the hard drive's memory was the issue (maybe that's what swapping is??)
I found Process Explorer which might help debug these things, but I haven't tried it yet.
I just learned that one way to clear memory is to put the code in a package and use reset. This preserves system variables.