I'm quite sure it is due to exceptions. Memory leaks did not occure if those 
two try...catch'es were in the same thread or no rethrow_exception() was used.

Best regards.
2014-01-17
lh_mouse
---------------------------------------------------------------------------------------------------------
发件人:Hannes Domani <ssb...@yahoo.de>
发送时间:2014-01-17 05:34
主题:Re: [Mingw-w64-public] Potential memory leaks in exception handling?
收件人:"mingw-w64-public@lists.sourceforge.net"<mingw-w64-public@lists.sourceforge.net>
抄送:

Hello 


lh_mouse <lh_mo...@126.com> schrieb am 18:38 Donnerstag, 16.Januar 2014: 
> I got memory leaks in this code. Hope someone would help. 
> Minimal sample code attached. 
> Compiled with g++ test.cpp -std=c++11 -static, then attached with OllyDbg, bp 
> malloc, calloc, realloc, free. There  > were 2 or 3 blocks of memory that 
> were not freed upon termination. 

Are you sure it's because of exceptions? 
I think the argv[]-strings in main() are copied and never freed. 

Regards 
Domani Hannes 


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to