11

My Visual Studio (2010 SP1) has a serious memory leak, and it seems to be caused by one or more of the installed extensions.

I have tried to narrow it down by turning extensions and add-ons on and off, but it takes a while of work to build up a significant leak and the results aren't totally conclusive. It rarely takes more than a few hours before the devenv.exe process uses 2GB memory and starts trashing, which is becoming a bit of a pain to work with.

Is there some way to make VS emit information on memory allocated for extensions?

Are managed extensions running in their own AppDomain? Maybe that would allow me to turn on some performance counters that could help pinpoint the problem.

Anything else I can do to troubleshoot this apart from disabling stuff one by one until the problem disappears?

Morten Mertner
  • 9,414
  • 4
  • 39
  • 56
  • Are you using any tools (I.e.: jetBrains dotTrace, Scitech memory profiler, .net clr profiler ) to isolate the issue? there is a good list of them here http://stackoverflow.com/questions/3927/what-are-some-good-net-profilers – Maciej Apr 01 '12 at 21:45
  • I do have licenses for both the RedGate and jetBrains tools, but don't see how they could be of much use considering that it takes an hour of using VS for the memory leak to have grown to a point where you could identify the culprit. Scitech might be able to do something with a native process like devenv, but I dont think the tools I have would be of much help. – Morten Mertner Apr 02 '12 at 00:33
  • To clarify, I don't think the leak is "always present". Something that I do while developing seems to eventually trigger the problem, and after that point VS just starts eating memory at a fairly fast pace. If I could attach a profiler after this happens it might actually produce a useful result. – Morten Mertner Apr 02 '12 at 00:36

1 Answers1

0

According to the JetBrains faq page you should be able to attach to an already running process when it starts to display memory leak issues. Perhaps you can give that a shot. Note that the faq states that you need to be using version 5.

Maciej
  • 2,175
  • 1
  • 18
  • 29
  • I had been hoping someone would tell me to just run devenv with a /dumpMemoryStatsOnExit switch or something, but I guess I'll have to see what a profiler comes up with. Thanks, though still open to any option that doesn't make this a dedicated task.. – Morten Mertner Apr 02 '12 at 11:39