Closed
Description
Hello!
How to reproduce the issue:
Make some application with logger.
For example: win8x64, release, static linkage with logger.
Start the application as win-console application.
Stop the application (Ctrl+C).
The issue description:
If application going to stop will be called
log4cplus::`anonymous namespace'::destroy_default_context::~destroy_default_context() Line 168 C++
and
log4cplus::`anonymous namespace'::alloc_dc() Line 179 C++
log4cplus::`anonymous namespace'::get_dc(bool alloc) Line 206 C++
log4cplus::shutdownThreadPool() Line 286 C++
log4cplus::Initializer::~Initializer() Line 115 C++
alloc_dc() will create the context again. This context will not be destroyed.
Well, we have memory leak.
What do you think about a fix of problem?
P.s.
In debug mode we have assertion (default_context_state is DC_DESTROYED)
alloc_dc ()
{
assert (! default_context);
assert(default_context_state == DC_UNINITIALIZED); <<<<---
...
Best regards,
Yuriy