Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Tagged as

Go to top

Fast and easy memory leak detection

, 26 Jan 2012
Rate this:
Please Sign up or sign in to vote.
For Visual Studio IDE we can detect leaks by using CRT debugger functions#define _CRTDBG_MAP_ALLOC#include #include void main(){ // ...... // ...... _CrtDumpMemoryLeaks();}This will dump leaks if any to the Output window. Check this link :...
For Visual Studio IDE we can detect leaks by using CRT debugger functions
 
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

void main()
{
   // ...... 
  // ......

  _CrtDumpMemoryLeaks();
}</crtdbg.h></stdlib.h>
 
This will dump leaks if any to the Output window. Check this link : http://msdn.microsoft.com/en-us/library/e5ewb1h3(v=vs.80).aspx[^]
 
Any way this seems to a nice tool. I will try it for sure. My 5

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Lakamraju Raghuram
Software Developer
India India
_____________________________________________________________
 
Did my masters from IIT-M in Advanced Manufacturing Technology and working mainly on C++ in CAD domain from 2004 onwards.

Comments and Discussions

 
GeneralMy vote of 1 PinmemberSivaraman Dhamodharan30-Jan-13 19:37 
GeneralRe: My vote of 1 [modified] PinmemberLakamraju Raghuram31-Jan-13 1:08 
GeneralSorry. I am not convinced. Memory leak detection should be d... PinmemberLakamraju Raghuram27-Jan-12 2:14 
GeneralWill there be any additional leaks in release mode compared ... PinmemberLakamraju Raghuram26-Jan-12 22:21 
GeneralRe: But you can't check the memory leaks of a release builds wit... PinmemberOctopod26-Jan-12 23:08 
GeneralReason for my vote of 2 Thank you for this hint for who don'... PinmemberOctopod26-Jan-12 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 26 Jan 2012
Article Copyright 2012 by Lakamraju Raghuram
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid