Hello all,
Class APRInitializer appears to have a resource leak. Towards the end, the
ctor has this block:
#if APR_HAS_THREADS
apr_status_t stat = apr_threadkey_private_create(&tlsKey, tlsDestruct,
p);
assert(stat == APR_SUCCESS);
#endif
But there is no matching code in the destructor. Our fix was to add this
block to the beginning of APRInitializer's dtor:
#if APR_HAS_THREADS
apr_threadkey_private_delete(tlsKey);
#endif
This causes problems when log4cxx is used in a dll/so which is
loaded/unloaded many times over the process life-cycle, such as a COM
object or native java class.
I understand log4cxx is no longer actively maintained, but I still thought
I mention it on this list in case somebody wants to pick it up. I won't do
more about it as we will most likely move away from log4cxx soon.
Kind Regards
Bjorn Thirud