|
-
January 14th, 2011, 12:20 PM
#10
Re: Detecting memory leaks (VC8)
 Originally Posted by Lindley
Just found some time to try this and yes, basically it works. According to that article I should see some output looking like this:-
Detected memory leaks!
Dumping objects ->
C:\PROGRAM FILES\VISUAL STUDIO\MyProjects\leaktest\leaktest.cpp(20) : {18}
normal block at 0x00780E80, 64 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
and indeed I do see such output as long as I allocated my memory using malloc() - but in my original example (using new) I see this:-
Detected memory leaks!
Dumping objects ->
e:\program files\microsoft visual studio 8\vc\include\crtdbg.h(1150) : {90} normal block at 0x00351A60, 80 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
Obviously, that's showing me the location of the debug new operator in crtdbg.h, rather than the position in my source file where new got used. Is there a way to fix this?
"A problem well stated is a problem half solved.” - Charles F. Kettering
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|