logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noam Rathaus <no...@beyondsecurity.com>
Subject log4cxx Visual Studio/Windows memory cleanup
Date Tue, 19 Oct 2010 05:23:34 GMT
Hi,

I used log4cxx since 2003, using several versions of Visual Studio, when
we upgraded to Visual Studio 2010, a memory leak/cleanup issue has appeared.

When the program terminates a memory leak can be seen.

The memory leak is from the log4cxx objects.

Even though I am using smart pointers when accessing and creating the
log4cxx objects, the leak is still there.

I have added the log4cxx::LogManager::shutdown() call to try and get it
to cleanup on itself, but it doesn't work.

I added debug code to verify that releaseRef of the objects is called,
and I noted that it is, however it is called for the "wrong" objects -
i.e. to a copy of them and not the original one.

So at some point they are getting copied and the original is kept but
"knowledge" of it is "lost".

The code is very simple 5 lines, which as I mentioned before, work
without leaking in previous versions.

Anyone with pointers to what I should look into?

I can provide additional details if needed.

Thanks,
Noam

Mime
View raw message