newbie question on memory leaks 
Author Message
 newbie question on memory leaks

Hello Gurus,

I am relatively new to the  vc environment. I am trying to figure out
where my memory leak is occurring. Is there a way to map the memory
location to the specific code which is leaking? The dump occurs upon
exiting of my application so the disassembly window does not help me.

Thanks ahead of time...gary

Detected memory leaks!
Dumping objects ->
{3838} normal block at 0x0068F494, 3280 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
CD
{3833} normal block at 0x0240ACAC, 3280 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
CD
Object dump complete.
The thread 0xFFF7E1A9 has exited with code 0 (0x0).



Sun, 03 Nov 2002 03:00:00 GMT  
 newbie question on memory leaks
Double click on the error line, that will get to the place where the object
was allocated.
BTW, I do not see the filename and line number in your dump.


Quote:
> Hello Gurus,

> I am relatively new to the  vc environment. I am trying to figure out
> where my memory leak is occurring. Is there a way to map the memory
> location to the specific code which is leaking? The dump occurs upon
> exiting of my application so the disassembly window does not help me.

> Thanks ahead of time...gary

> Detected memory leaks!
> Dumping objects ->
> {3838} normal block at 0x0068F494, 3280 bytes long.
>  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> CD
> {3833} normal block at 0x0240ACAC, 3280 bytes long.
>  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> CD
> Object dump complete.
> The thread 0xFFF7E1A9 has exited with code 0 (0x0).



Mon, 04 Nov 2002 03:00:00 GMT  
 newbie question on memory leaks
About the file name, you are correct it does not get dumped.....gary.
Quote:

> Double click on the error line, that will get to the place where the object
> was allocated.
> BTW, I do not see the filename and line number in your dump.



> > Hello Gurus,

> > I am relatively new to the  vc environment. I am trying to figure out
> > where my memory leak is occurring. Is there a way to map the memory
> > location to the specific code which is leaking? The dump occurs upon
> > exiting of my application so the disassembly window does not help me.

> > Thanks ahead of time...gary

> > Detected memory leaks!
> > Dumping objects ->
> > {3838} normal block at 0x0068F494, 3280 bytes long.
> >  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> > CD
> > {3833} normal block at 0x0240ACAC, 3280 bytes long.
> >  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> > CD
> > Object dump complete.
> > The thread 0xFFF7E1A9 has exited with code 0 (0x0).



Mon, 04 Nov 2002 03:00:00 GMT  
 newbie question on memory leaks
Hello,

You can use following defines at the beginning of your c file to solve your
problem.
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
More details please refer to "memory leak debugging" topic in VC help.

Best regards,
Gan ZheKang


Quote:
> Hello Gurus,

> I am relatively new to the  vc environment. I am trying to figure out
> where my memory leak is occurring. Is there a way to map the memory
> location to the specific code which is leaking? The dump occurs upon
> exiting of my application so the disassembly window does not help me.

> Thanks ahead of time...gary

> Detected memory leaks!
> Dumping objects ->
> {3838} normal block at 0x0068F494, 3280 bytes long.
>  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> CD
> {3833} normal block at 0x0240ACAC, 3280 bytes long.
>  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> CD
> Object dump complete.
> The thread 0xFFF7E1A9 has exited with code 0 (0x0).



Mon, 04 Nov 2002 03:00:00 GMT  
 newbie question on memory leaks
In MFC project you would have the following code fragment at the top of your
.cpp file:

... code sample

#include "stdafx.h"
// ... other includes

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

... end of code sample

The __FILE__ macro expands to filename at compile time.


Quote:
> About the file name, you are correct it does not get dumped.....gary.


> > Double click on the error line, that will get to the place where the
object
> > was allocated.
> > BTW, I do not see the filename and line number in your dump.



> > > Hello Gurus,

> > > I am relatively new to the  vc environment. I am trying to figure out
> > > where my memory leak is occurring. Is there a way to map the memory
> > > location to the specific code which is leaking? The dump occurs upon
> > > exiting of my application so the disassembly window does not help me.

> > > Thanks ahead of time...gary

> > > Detected memory leaks!
> > > Dumping objects ->
> > > {3838} normal block at 0x0068F494, 3280 bytes long.
> > >  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> > > CD
> > > {3833} normal block at 0x0240ACAC, 3280 bytes long.
> > >  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
> > > CD
> > > Object dump complete.
> > > The thread 0xFFF7E1A9 has exited with code 0 (0x0).



Mon, 04 Nov 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie question: test memory leaks

2. Newbie question about memory leak!

3. Newbie needs help with memory leak

4. Newbie: SysReAllocStringLen in OLEAUT32.DLL memory leak.

5. Newbie: Memory Leaks detection help

6. NewBie: Memory leaks

7. Newbie: Memory Leak?!?

8. Newbie alert! Using CString and memory leaks

9. Handle leak, memory leak...

10. Memory Leaks Question

11. Memory leak question...

12. Memory leak question

 

 
Powered by phpBB® Forum Software