I've been working on this same project at work for several months now, and today I started having some issues. I went to "save all" and got a message that there was insufficient storage. Since I have nearly 20GB free on my disk I knew that wasn't exactly right. I looked in Task Manager and, lo and behold, devenv.exe was using over 1GB or my RAM. I have 2GB RAM on this machine so I didn't notice any issues with other programs while this was happening. It was just VS.
I'm hoping someone will have some thoughts on what I might try to fix this problem. It's very frustrating because I have to close VS regularly and re-launch it to release this memory.
So anyway, first, a little background.
My System Setup
I have a Dell XPS laptop, 2.?? GHz Intel, 2GB RAM, 100GB HDD. I have Windows XP Pro, SP2. I am running VS 2005 with SP1 that came out a few months ago. I recently (within the last week or so), removed all of the .NET 3.0 stuff I had (framework, VS extensions, etc.), as well as ASP.NET AJAX, and reinstalled them to make sure I had the latest bits of everything.
My System Snapshot
After starting the morning with a fresh semi-weekly reboot, I started working as normal. Currently running on my system, besides VS 2005:
- Outlook 2003
- SQL Server 2000, 2005 Express, and SQL Server Mgmt Studio
- iTunes
- Windows Live Messenger
- Cropper
- My RSS reader
- Various other tiny apps and things that just run with Windows XP
The Solution
The entire solution takes roughly 150MB on disk, including resources such as images and documents, and has 9 projects (all VB.NET):
- A client EXE
- A Windows service
- Two other EXEs
- Five shared libraries (DLLs)
I have a custom build configuration that is exactly the same as the standard "Debug" build configuration, except that it does not build the service (since it is usually running). When I want to build the service, I stop the service, switch to Debug, build, switch back to custom build configuration.
This project is not under source control through VS, so I am doing manual backups on a regular basis. I know this is wrong on so many levels, but when I started, there was no source control server. I have since set one up, but haven't added the project yet. In the meantime, I am backing up to a time-stamped folder on the network.
The Problem
So far, except for the .NET 3.0 and AJAX un/re-install, this is no different than my environment has been for the last several months. Yet today, I was having troubles. After I noticed the trouble for a while, I decided to close down VS and start it up again, this time keeping track of what I did and the effects on memory usage. I did some simple documenting of my step, and took some screenshots of Task Manager. I recorded memory usage after each step, although I failed to take screen shots at each step, so I've just included a few of those for kicks. So, here goes:
So, what's the deal? Is it related to the .NET 3.0 / AJAX stuff I mentioned above? I know some of the steps I've mentioned are contrived, but they're not at all unrealistic. The process of adding a variable declaration, building, removing it, building again shouldn't really take up 85MB of RAM that never gets released, right?
I did a quick Google search for Visual Studio 2005 memory leaks, but didn't find anything helpful in the first page or so, so I stopped looking hoping that someone might have a suggestion. If anyone has any ideas, please comment on this post or e-mail me directly. If you don't have my e-mail address, you can use the contact form on this site. This isn't stopping me from working, but it's stopping me from working effectively.
As you may or may not know, I use Telligent's Community Server as a blog engine here, as well as for photos and forums elsewhere. Well, they are having a Theme Extravaganza -- a contest for making custom themes. Prizes include MacBooks, XBox 360s and Amazon gift cards.
Dan Bartels, a Milwaukee area local, works for Telligent, and he contacted me the other day with this offer:
While I cannot enter the "public contest" I'd be willing to give some help to some folks to get them started, point them in the right direction, ect... So please extend this offer to anyone you see fit.
Further, we are having in "internal" contest; here is where I could use some help... I could use some PSD's and or artwork from a community member (I will give them full credit and linkage for the design)...
If you're interested, please contact Dan, either via his website or by e-mailing him at dbartels AT telligent DOT com.
Good luck!