You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Curt Arnold <ca...@houston.rr.com> on 2004/07/27 17:13:41 UTC
Timezone side effects (was Re: Memory Leaks in Log4cxx)
On Jul 27, 2004, at 7:29 AM, FabijanicA@nucorsteel.com wrote:
> 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()
>
I had been troubled by timezone.cpp, but have not had time to
investigate the issue. It appears that it could have unintended side
effects since it appears to be setting the current timezone not just
for the logging code but for the application as a whole.