Hi all,
I am using log4cxx version 0.9.7. I check log4cxx for memory leak with my application, it gives me memory leak at NDC::push.
I am calling it as
const char * methodName = "getTagName";
NDC::push(methodName);
and I get memory leak :
MLK: 64 bytes leaked at 0x8875f8
* This memory was allocated from:
malloc [rtlib.o]
c2n6Fi_Pv___1 [libCrun.so.1]
void*operator new(unsigned) [rtlib.o]
void*std::allocator<log4cxx::NDC::DiagnosticContext>::allocate(unsigned,void*) [liblog4cxx.so.9]
log4cxx::NDC::DiagnosticContext*std::allocator_interface<std::allocator<log4cxx::NDC::DiagnosticContext>,log4cxx::NDC::DiagnosticContext>::allocate(unsigned,log4cxx::NDC::DiagnosticContext*) [liblog4cxx.so.9]
void std::deque<log4cxx::NDC::DiagnosticContext,std::allocator<log4cxx::NDC::DiagnosticContext> >::__allocate_at_end() [deque]
void std::deque<log4cxx::NDC::DiagnosticContext,std::allocator<log4cxx::NDC::DiagnosticContext> >::push_back(const log4cxx::NDC::DiagnosticContext&) [liblog4cxx.so.9]
void std::stack<log4cxx::NDC::DiagnosticContext,std::deque<log4cxx::NDC::DiagnosticContext,std::allocator<log4cxx::NDC::DiagnosticContext> > >::push(const log4cxx::NDC::DiagnosticContext&) [liblog4cxx.so.9]
void log4cxx::NDC::push(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&) [ndc.cpp]
EMS_NDC::EMS_NDC(const char*,log4cxx::Logger*) [emslog.h:22]
How do i overcame with this?
Prakash F. Kadam