After working in SSMS all day, task manager reported about 250MB of memory in use ("Mem Usage") by the program. At the time I had 10 query windows open, none of which had overly large scripts (total size of the scripts was about 45k) or large result sets. There were no connections open in the Object Explorer tree.
My system was under memory pressure, so I wanted to reclaim memory. I saved all of my scripts as I was ready to move on to other projects and closed all the query windows. Task manager reported no change in memory usage by SSMS. I waited several minutes, but no memory was released. I started a new query window, and about 20MB of memory was released.
At this point I restarted SSMS, and it has been sitting idle for over 10 minutes now with memory usage reported at 80 MB. So my first question is, why didn't memory usage go back down to 80 MB when I closed all those query windows?
This happens to me every day - I've just never asked about it before. Every day I have to restart SSMS to get it to release memory that it holds onto even if I close all my query windows. It looks like something might be wrong with SSMS memory management.
I am running SSMS 2008 (10.0.2531.0) on Windows XP Pro Version 2002 Service Pack 3.