Re: string memory leak?
- From: "navels" <navels@xxxxxxxxx>
- Date: 15 Aug 2006 11:20:54 -0700
navels wrote:
Carl Daniel [VC++ MVP] wrote:
navels wrote:
I've been battling a memory leak in a C++ console app for some time.
I
have finally tracked down the source by using the Microsoft tool umdh
for dumping the heap. I seem to be unable to reproduce the problem in
a small code snippet. Hopefully I can post enough information here to
make sense to folks.
BTW, I am compiling with Visual C++ 6.0.
Have you applied the STL patches available from
https://www.dinkumware.com/vc_fixes.html
??
If not, you should. Pay particular attention to the fixes to <xstring>
-cd
Ahhhh, thanks. I needed to make std::string thread-safe. There is
more information about this problem here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;813810
I still have one more leak that has something to do with std::string.
I am surprised that the dinkumware fixes did not address this leak as
well. Here is the output from umdh for that one:
[snip]
Follow up: the first leak is not present in VS 2005, as expected. The
second leak is. Based on what I've gleaned from other posts in this
group, it is a safe bet that I'm at fault for that one, so I'll take a
closer look at the code.
Thanks again,
Lee
.
- Follow-Ups:
- Re: string memory leak?
- From: navels
- Re: string memory leak?
- References:
- string memory leak?
- From: navels
- Re: string memory leak?
- From: Carl Daniel [VC++ MVP]
- Re: string memory leak?
- From: navels
- string memory leak?
- Prev by Date: Re: string memory leak?
- Next by Date: Re: string memory leak?
- Previous by thread: Re: string memory leak?
- Next by thread: Re: string memory leak?
- Index(es):
Relevant Pages
|