Sorry. I am not convinced.
Memory leak detection should be done on debug builds and it is not wise to have configuration specific heap allocations. Take my word it is wrong practice.
And in many cases we will not have .pdb files for 3rd party tools. They just won't expose them as I can parse thorough their code.
And what I will do with a tool which is CRASHING. It is ridiculous.
Hope I have convinced you. If so try thinking of changing your vote. (:-
Will there be any additional leaks in release mode compared to debug more. Unless we code like
#if debug
int* i = new int[7];
#endif
And coming to the third party code, the above code still breaks but wont show you the code or the stack will not lead you properly. And by the way I tried this and it is crashing with VS2010 SP2 as well as with SP1.
But you can't check the memory leaks of a release builds with the _CrtDumpMemoryLeaks trick. You can't always use debug build, for example when doing a diagnostic in production context. In addition, as you point, release builds can have different behavior.
Coming to the thrid party code, the callstack shows you the code that make call to the third party, which can lead you to understanding a wrong use of this third party code. And sometimes you have the .pdb of release third party code, revealing the full callstack (check Symbols servers, http://msdn.microsoft.com/en-us/library/windows/desktop/ee416588(v=vs.85).aspx#ID4EUG, it might be of interest).
About the VS2010 I think you're facing to the same troubles we can encounter with VS2008 or other versions. Some applications are more unstable with LiveHeap hooked on them. I'm not sure this is linked to the version of VS.
Reason for my vote of 2
Thank you for this hint for who don't know it already. The downside is that with _CrtDumpMemoryLeaks, only the allocations made by your code will be catched and reported. By using LiveHeap, you can catch all allocations, even those that are done in release code and in third party code.
Last Visit: 31-Dec-99 18:00 Last Update: 17-Jun-24 11:55