Skip to main content
GameDev.net gamedev.net
🔒 Locked

memory leak

Started by giugio Sep 7, 2010 at 4:41 AM 4 replies 1.2k views
Original Post
giugio
giugio
Hello.
Searching on google I saw that there are programs that help to find memory leaks.
I use visual studio 2008 vc++ 9.
What software do you recommend?
thanks.
SiCrane
SiCrane
MSVC's CRT implementation has built in leak detection functionality. Relevant functions include _CrtDumpMemoryLeaks() and _CrtSetDbgFlag().
21st Century Moose
21st Century Moose
Valgrind is Linux and OSX only which limits it's usefulness quite a bit. I believe that there may be Windows ports (a quick Google search throws up some likely candidates) but I've never used any of them and can't vouch for them.

One leak detection trick that the mighty Raymond Chen has blogged about is: if you're leaking lots of objects of the same type, just grab a random block of memory and examine it for repeating patterns. That's your leaked object. Knowing what you've leaked can often be all you need to track down the source of the leak.
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.