Jump to content
  • Advertisement
Sign in to follow this  
simotix

Memory Leak Cheaking

This topic is 3376 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Quote:
Original post by simotix
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)


It does, though only for 32bit builds.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!