Memory Leaks

Started by
4 comments, last by weasalmongler 19 years, 11 months ago
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
Advertisement
For C++: How To Find Memory Leaks

Edit: Typo

[edited by - nonpop on May 21, 2004 7:14:20 PM]
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]
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.
Thanks for the help, I''ll have a look into it.

- James

This topic is closed to new replies.

Advertisement