This project has moved and is read-only. For the latest updates, please go here.

Possible memory leaks?

Sep 19, 2013 at 10:34 PM

Thank you for Visual Studio Spell Checker.

I've noticed that when I have this extension enabled, devenv.exe's memory usage will "steadily" increase and never seems to decrease.

I notice this especially when running many mstest unit tests within Visual Studio over time.

When I disable this extension, devenv.exe does not end up consuming more memory over time as before.

For example, devenv.exe would eventually consume 2GB memory and I would have to quit and relaunch the sln to get it to be more responsive. Closing the open windows within Visual Studio for example does not reclaim memory.

I am wondering if there is a way to troubleshoot the issue so that we can make sure that this extension is actually misbehaving and not something else, like visual studio itself?

Windows 7 Enterprise 64-bit Service Pack 1
Visual Studio 2010 SP1
Visual Studio Spell Checker

Thank you.
Sep 20, 2013 at 4:10 PM
Spell checking isn't tied to unit tests in any way so I'm not sure why you'd be seeing it consume memory under those circumstances. When I first went through the code I checked to make sure things were being disposed of and that does seem to be happening. The vast majority of objects don't implement IDisposable since they're WPF related. Some weak references are tracked and in watching those to see when they went away I did notice that Visual Studio tends to hold on to the editor related objects a lot longer than I would have expected even after closing the files. That said, I use the spell checker in VS 2010 and 2012 all the time and haven't seen it consume more memory than usual. I'll take another look at it but I'm not sure if there's anything more I can do since I'm not seeing the issue.

Sep 20, 2013 at 8:02 PM
Do you debug ms unit tests within Visual Studio?

If you don't, that might be why you are not seeing the issue.

I'm thinking it's not directly related to ms unit tests, but the way the IDE behaves when debugging ms unit tests because it seems the IDE will close \ re-open\display a different set of open files\windows\layout and this may be causing issues.

This is just what I have experienced but I'm not 100% sure because I don't know how to verify or debug the issue.

How did you track\watch resource allocation count \ de-allocation?

Thank you.
Sep 22, 2013 at 8:44 PM
No, I don't debug unit tests. In a normal session over the course of a day I tracked memory usage (editing with the text editor and form designers, build, debug, repeat over and over in various projects). It went up by about 150MB overall fluctuating up and down as I went between projects. 2GB is excessive but I can't say why it does that in your case. If it were a common case, I think it would have been reported more often. If you can create an example that reproduces the problem and can e-mail it to me or attach it here in a work item I'll take a look at it.