Memory Leak Detection

W

Winbatch

Is there a free or shareware tool to detect memory leaks in C++ programs?
I've done a variety of google searches but either came up with commercial
products or ones I could not get to detect blatantly leaking code.
 
W

Winbatch

This also appears to be C (malloc/free) related based on this:

Using the Garbage Collector as Leak Detector
The garbage collector may be used as a leak detector. In this case, the
primary function of the collector is to report objects that were allocated
(typically with GC_MALLOC), not deallocated (normally with GC_FREE), but are
no longer accessible
 
E

E. Mark Ping

This also appears to be C (malloc/free) related based on this:

Using the Garbage Collector as Leak Detector
The garbage collector may be used as a leak detector. In this case, the
primary function of the collector is to report objects that were allocated
(typically with GC_MALLOC), not deallocated (normally with GC_FREE), but are
no longer accessible

It's both C and C++ compatible. It's a widely known GC implementation
for C and C++. Use it or not, I really don't care.
 
W

Winbatch

All I was asking is if it would detect 'new' and 'delete' bugs and not just
malloc and free. ( I only use new and delete).
 
R

Raymond Martineau

Is there a free or shareware tool to detect memory leaks in C++ programs?
I've done a variety of google searches but either came up with commercial
products or ones I could not get to detect blatantly leaking code.

There was an posting in clc++.moderated about a memory leak detector and
how to write one yourself (or at least adapt a detector to handle the new
and delete operators). The only problem is that it relies on macros, which
can interfere with programs using the placement new and delete operators.
http://wyw.dcweb.cn/leakage.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Memory Leak Detection 11
Memory Leak detection 1
Memory leak detection tools? 8
c++ memory leak detection 9
Memory Leak/Profiling 9
memory leak 3
memory leak problem. 6
Does this function leak memory? 2

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top