Lt Col Gecko Pointdexter
2005-03-30 11:56:53 UTC
I experience the following problem with VS 2003 (Visual C++):
- I have a solution containing several dll projects and one executable
- When running the Debug build, with the debugger attached (F5), I get
very many leaks reported
- I managed to identify where the reported allocation takes place, and
I am positive that memory is freed; I know for sure because
- One of the leaks (all of the ones I tested - there are too many to
test all) is reported in the constructor of a static object, and the
respective pointer is deallocated in the destructor.
- I put a breakpoint in the destructor and now when I run I get the
- Memory is allocated, I see my gui
- I close the application
- I get a bunch of leaks reported in the output window
- After the memory leak dump is complete, the debugger breaks in the
destructor and execution continues and memory is deallocated.
So, what I am trying to say is that the debugger reports the leaks
before the execution is actually over, and after the leaks are
reported, the static objects are destructed, freeing the memory which
was reported as leaked. This confuses me as I have troubles seeing if
there are any real memory leaks. I hope I made myself clear.
Has anyone had this problem or does anybody know of a remedy?
You're going to reap just what you sow.
Lt. Col. Gecko Pointdexter - expert specialist
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to: