After running a long script, I looked at Windows Task Manager (Windows 7 64bit) and saw that over 3 gig of memory was used. I removed all variables from memory. The memory was still used. So I searched SO and found this post. I tried running gc(). I get the following:
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 893182 47.8 1835812 98.1 1835812 98.1
Vcells 2061325 15.8 19962389 152.4 407302954 3107.5
This is after a few minutes of waiting. I was expecting much of the memory to be freed. Am I missing something? Thanks.