Memory Leaks
Hello, I was wondering if anyone knew a good program or a good way of checking for memory leaks in a program. I want to check my program and dont fancy logging every allocation and deallocation of memory
Any help is much appreciated, thanks.
- James
Most leak checking methods are language and/or compiler specific. Mentioning, at least, which programming language you are using might be a good idea.
I am using C for the programming. That means i cannot overload the new and delete operators (which is a shame). So thanks for the help, but does anyone know a way to do it for C ?
EDIT : Oh, and MSVC++ 6.0 for compiler.
- James
[edited by - weasalmongler on May 21, 2004 7:33:18 PM]
EDIT : Oh, and MSVC++ 6.0 for compiler.
- James
[edited by - weasalmongler on May 21, 2004 7:33:18 PM]
Look up MSVC''s C runtime library debug functions. In particular: _CrtDumpMemoryLeaks(), _CrtMemDifference(), _CrtMemCheckpoint() and _CrtSetDbgFlag(). Your compiler documentation should have a basic tutorial on how to use these functions.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement