For Programmers: Free Programming Magazines  


Home > Archive > MSDN > June 2004 > detect memory leaks









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author detect memory leaks
A Benn

2004-06-08, 8:55 am

MS Visual c++ V6.0

I'm getting memory leak reports ...

Detected memory leaks!
Dumping objects ->
{819} normal block at 0x03114610, 1788 bytes long.
Data: < ( > 00 00 00 00 C0 00 00 00 28 06 00 00 CD CD CD CD
{818} normal block at 0x0264CF78, 88 bytes long.
Data: <p O O p O O > 70 11 4F 00 C0 12 4F 00 70 13 4F 00 20 14 4F 00
Object dump complete.

and I've tried following the procedures described in help, to use the global
variable _afxBreakAlloc to break at the appropriate position, but the
compiler complains that this variable is undeclared. I also tried someone
elses suggestion of a breakpoint in afxmem.cpp and that didn't work either.
_afxBreakAlloc doesn't seem to be defined anywhere in the MFC sorce code.

Any other suggestions on how I locate these leaks please ?



A Benn

2004-06-08, 8:55 am

Solved my own problem with a bit more searching. Using
_CrtSetBreakAlloc(location) works fine

--
"A Benn" <%^%^^abenn@netspace.com.au> wrote in message
news:40c57339@dnews.tpgi.com.au...
> MS Visual c++ V6.0
>
> I'm getting memory leak reports ...
>
> Detected memory leaks!
> Dumping objects ->
> {819} normal block at 0x03114610, 1788 bytes long.
> Data: < ( > 00 00 00 00 C0 00 00 00 28 06 00 00 CD CD CD CD
> {818} normal block at 0x0264CF78, 88 bytes long.
> Data: <p O O p O O > 70 11 4F 00 C0 12 4F 00 70 13 4F 00 20 14 4F 00
> Object dump complete.
>
> and I've tried following the procedures described in help, to use the

global
> variable _afxBreakAlloc to break at the appropriate position, but the
> compiler complains that this variable is undeclared. I also tried

someone
> elses suggestion of a breakpoint in afxmem.cpp and that didn't work

either.
> _afxBreakAlloc doesn't seem to be defined anywhere in the MFC sorce code.
>
> Any other suggestions on how I locate these leaks please ?
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com