Sign in to follow this  
simotix

Memory Leak Cheaking

Recommended Posts

Does anyone know a good DLL that will print out the location on the line of the memory like that works with Windows Vista? I use to use VLD but that does not work with Vista (or if someone has a Vista version of VLD and can give it to me, please do. The one on the website does not work)

Share this post


Link to post
Share on other sites
Quote:
Original post by simotix
Does anyone have any suggestions?


I suggest waiting at least 24 hours before bumping. The moderator for this specific forum may suggest more. It is entirely possible that the person best qualified to answer your question is asleep right now.

Share this post


Link to post
Share on other sites
If your using Visual Studio, a simple way without using a DLL is to to set-up your main file as below. This will print out the line and file in which memory leaks occur. I have used this with both Vista and Windows 7 for basic memory leak detection without fail.



// ALL STL Includes must go before.

#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#define _INC_MALLOC
#include <crtdbg.h>
#define new new( _NORMAL_BLOCK, __FILE__, __LINE__ )
#endif

// All Project includes go after.

int main()
{
#ifdef _DEBUG
// Register leak check after program end
_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) );
#endif

// .....

return 0;
}


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this