Memory leak
-
Hi, I have come accross a memory leak in my project ... could anyone suggest any memmory leak testing utility which will help me pinpoint the source of the leak regards
-
Hi, I have come accross a memory leak in my project ... could anyone suggest any memmory leak testing utility which will help me pinpoint the source of the leak regards
BoundsChecker from Numega is great. You can get a 15-days evaluation copy their website... - Anders Money talks, but all mine ever says is "Goodbye!"
-
Hi, I have come accross a memory leak in my project ... could anyone suggest any memmory leak testing utility which will help me pinpoint the source of the leak regards
BoundsChecker does work wonders, but the object dump should do a pretty good job of telling you where your leak might be. Sometimes, if you're lucky, if you click on the object name or the memory address the debugger spits out right below "Detected memory leaks -->" it will put you in the right area of the source. If it doesn't, then you'll have to do a little fishing on your own or consider NuMega products. Bill http://www.ratebeer.com
-
BoundsChecker does work wonders, but the object dump should do a pretty good job of telling you where your leak might be. Sometimes, if you're lucky, if you click on the object name or the memory address the debugger spits out right below "Detected memory leaks -->" it will put you in the right area of the source. If it doesn't, then you'll have to do a little fishing on your own or consider NuMega products. Bill http://www.ratebeer.com
Actually, if you really want to track down these memory leaks without forking out for BoundsChecker, there is a really good debugging trick described in Knowledge Base Article Q151585 which described the _crtBreakAlloc variable (You can search for Q151585 or "Use _crtBreakAlloc to Debug a Memory Allocation" in MSDN) Basically, when you get an object dump with numbers next to it, you start your program in the debugger, set _crtBreakAlloc to that number, then run your program. The debugger will break when the memory is allocated that you have forgotten to free. Very very handy. ------------------------ Derek Waters derek@lj-oz.com