logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Czerpak <lukasz.czer...@softnet.com.pl>
Subject Re: [VC6SP6, WinXP PRO] memory leaks in 'trivial' example
Date Thu, 17 Jun 2004 14:23:28 GMT
Schouw, Lars [TKY] wrote:
> Check in CVS there is a fix for that problem now.
> Get a never version of the file where main() is.
> Lars
>

Thank You for fast an answer.
Because i want to be sure i've reinstalled vs6 with sp6. I also downloaded
the newest version of log4cxx from cvs. The trivial example works fine and
there is no memory leaks  But i have one question about using log4cxx in
mfc apps. I created simple testing project: Win32 Console Application with
MFC. Main() function contains, after MFC initialization, body of trivial
example. I built two versions:
1) DEBUG: with dynamically linked MFC and dynamically linked log4cxx
2) DEBUG: with statically linked MFC and statically linked log4cxx (with
LOG4CXX_STATIC)
In a first case debugger shown 2 block of memory leaks, in a second one
there were many memory leaks.

I don't have any experience with VS .NET 2003 but i did the same tests.
The results are different. Dynamically linked MFC App with LOG4CXX DLL
generates memory leaks, but statically linked mfc and log4cxx works ok.

In MS Knownledge Base i found an article about memory leaks, but in old
versions of VC. They inform that sometimes memory leaks may happened
when objects not related with mfc are freeing from memory after freeing of
mfc.
Then MFC's memory controlling mechanism notify about ml. For example
an mfc app uses dll library, which unloads after unloading mfc classes.
A don't know if i understand this well. But the problem with warnings about
memory leaks still exists. It is very hard to debug own application, without
being sure where the leaks are from.

regards,

Lukasz Czerpak
SOFTNET

Mime
View raw message