logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabijan...@nucorsteel.com
Subject RE: Memory Leaks in Log4cxx
Date Tue, 27 Jul 2004 12:29:40 GMT

There are 13 memory leaks and 7 resource leaks reported at the end of
execution. I am still trying to figure out most of them, but here's where
some of the leaks reported are coming from:

timezone.cpp      line 32 [2 leaks - calling tzset and gmtime]:
TimeZonePtr TimeZone::defaultTimeZone = new TimeZone(_T(""));
timezone.cpp      line 92 [1 leak - calling putenv]:              return
new TimeZone(ID);

tzset(), gmtime() and putenv are all calling malloc()

Apparently resource leaks all have to do with InitializeCriticalSection
calls not having matching DeletecriticalSection prior to terminate.

I have been running a real world process using log4cxx for about a week now
and I do see small increase in process memory and number of handles over

I'll keep on looking.

Aleksandar Fabijanic
Level 2 Automation Engineer
Nucor Steel Berkeley - Beam Mill
Phone: 843.336.6678
Fax:      843.336.6072

             ty.com>                                                    To 
                                       'Log4CXX User'                      
             07/27/2004 06:56          <log4cxx-user@logging.apache.org>   
             AM                                                         cc 
             Please respond to         RE: Memory Leaks in Log4cxx         
              "Log4CXX User"                                               

I have used a win32 console based application. I already have attached the
file and sent it across.
Just in case you do not get it I have attached it with this mail. When you
run it you will get the leaks listed in
the output window.


-----Original Message-----
From: Michael CATANZARITI [mailto:mcatan@free.fr]
Sent: Tuesday, July 27, 2004 4:09 PM
To: Log4CXX User
Subject: Re: Memory Leaks in Log4cxx


If you tested log4cxx with MFC, you will get false memory leaks because of
static class members which are destroyed after the leak dump is displayed
the ouput.
If not, please send your leak dump to the mailing list.


Selon Christophe de VIENNE <cdevienne@alphacent.com>:

> Hi,
> Hemant wrote:
> >Hi,
> >I have installed log4cxx library on Windows xp. I have used the dll as
> >as the static version of the library. I am almost certain that there are
> >memory leaks in the library.
> >
> >
> Could you be more precise about the memory leak(s) ? What make you think
> that and do you have presumption on where ?
> >Also when I used the dll version of the library I get a runtime error
> >"pure virtual function call" error no. R6025.
> >
> >
> On which function call ?
> >Do you have any fix for the memory leaks as well as the above mentioned
> >error.
> >
> >
> I don't know about it.
> Cheers,
> Christophe

(See attached file: testapp.cpp)
View raw message