Davlet Panech wrote:
> Good day,
>
> I believe there's a problem with the use of static local variables
> w/non-trivial constructors within log4cxx code (bug LOG4CXX-159,
> http://issues.apache.org/jira/browse/LOGCXX-159 ). Log4cxx contains
> things like this (from ndc.cpp):
>
> const LogString& NDC::getNull() { static LogString
> nullStr(LOG4CXX_STR("null")); return nullStr; }
>
> I think there are two major problems with this (and similar) code:
[two major problems omitted]
I'd like to just add a minor point against these statics: when you use a
simple and cheap leak detector tool like the debug heap of visual
studio, all these statics show up as leaks and make it difficult to
detect real leaks in the forest of warnings.
To solve this problem it would probably enough to have some 'uninit'
function.
Regards, Peter
--
_ _ Peter Steiner <[EMAIL PROTECTED]>
/ /_/ / Hug-Witschi AG <http://www.hugwi.ch/>
/ _ / Electronic Engineering
/_/ /_/ _ _ Auriedstrasse 10
/ / / / / / CH-3178 Boesingen
/ /_/ /_/ / Tel +41 31 740 44 44
/_ _ _ _ _/ Fax +41 31 740 44 45