Tracing memory leaks 
Author Message
 Tracing memory leaks

Hi,

how could I turn on tracing of allocations/deallocations when using the STL
classes (and NOT using MFC). More specifically I'd need the file name and
line number of the allocations that caused a memory leak.

I'm currently getting info on memory leaks that happen and their size, but I
can't get it to work with the extra information.

TIA // Johan



Tue, 10 Sep 2002 03:00:00 GMT  
 Tracing memory leaks

Quote:
> Hi,

> how could I turn on tracing of allocations/deallocations when using the
STL
> classes (and NOT using MFC). More specifically I'd need the file name and
> line number of the allocations that caused a memory leak.

> I'm currently getting info on memory leaks that happen and their size, but
I
> can't get it to work with the extra information.

> TIA // Johan

Define this macro : _CRTDBG_MAP_ALLOC
and you will get also the file and line number of allocation.


Wed, 11 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Any good ways to trace memory leaks?

2. tracing memory leaks

3. How to trace problem Memory leak ?

4. Handle leak, memory leak...

5. TRACE() from threads causing resource leaks?

6. Class object, returning pointers, dynamic memory, memory leaks

7. Finding memory leaks in shared memory pool

8. Memory leaks, DLL and memory allocation.

9. Tracking memory leaks and debugging memory problems

10. Memory leak when using Memory DC

11. Trace C memory allocation

 

 
Powered by phpBB® Forum Software