views:

4654

answers:

5

I have a .exe and many plug-in .dll modules that the .exe loads. (I have source for both.) A cross-platform (with source) solution would be ideal, but the platform can be narrowed to WinXP and Visual Studio (7.1/2003 in my case).

The built-in VS leak detector only gives the line where new/malloc was called from, but I have a wrapper for allocations, so a full symbolic stack trace would be best.

The detector would also be able to detect for a leak in both the .exe and its accompanying plug-in .dll modules.

A: 
Anders Sandvig
A: 

Try Jochen Kalmbach's Memory Leak Detector on Code Project. The URL to the latest version was somewhere in the comments when I last checked.

Vulcan Eager
+11  A: 

I personally use Visual Leak Detector, though it can cause large delays when large blocks are leaked (it displays the contents of the entire leaked block).

Zooba
+3  A: 

If you don't want to recompile (as Visual Leak Detector requires) I would recommend WinDbg, which is both powerful and fast (though it's not as easy to use as one could desire).

On the other hand, if you don't want to mess with WinDbg, you can take a look at UMDH, which is also developed by Microsoft and it's easier to learn.

Take a look at these links in order to learn more about WinDbg, memory leaks and memory management in general:

David Alfonso
Unfortunately first link is not working any more ...
tommyk
I've added more links and removed the one failing. I hope it helps!
David Alfonso
A: 

What is built-in VS leak detector ? Can someone please provide some details ?

Jigish
I think he refers to crtdbg.h, http://msdn.microsoft.com/en-us/library/x98tx3cf%28VS.80%29.aspxThere are tons of tips about it on stackoverflow.
catchmeifyoutry