logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Griffiths, Patrick" <pgriffi...@tycothermal.com>
Subject RE: Memory Leak with MFC
Date Thu, 05 Nov 2009 14:39:40 GMT
This doesn't show that the leak is or is not log4cxx.

Keep in mind that log4cxx uses static singleton objects. It's quite possible that what you
are seeing is a simply a side effect caused by the ordering of the destruction of static objects.

-----Original Message-----
From: "山脇健一(Yamawaki Kenichi)" [mailto:k-yamawaki@carinasystem.co.jp]
Sent: Wednesday, November 04, 2009 5:23 PM
To: log4cxx-user@logging.apache.org
Subject: Memory Leak with MFC

Hi Exparts,

I use the log4cxx-0.10.0.
I made below programs with MFC. Then I have faced a certain memory leak.
Please teach the method of settlement.

// leak version (with MFC)
BOOL CLogTestDlg::OnInitDialog()
        LoggerPtr       logger = Logger::getLogger( "test" );
        return TRUE;

Detected memory leaks!
Dumping objects ->
{1152} normal block at 0x01B08818, 56 bytes long.
 Data: <0 n 0 n 0 n     > 30 F1 6E 02 30 F1 6E 02 30 F1 6E 02 00 00 00 00
{1151} normal block at 0x01B08768, 116 bytes long.
 Data: <Lb  db   -n     > 4C 62 1D 10 64 62 1D 10 8C 2D 6E 02 00 00 00 00

    -----Omission ------

{124} normal block at 0x01B02218, 52 bytes long.
 Data: < P   l  P       > C8 50 B0 01 90 6C B0 01 50 BA B0 01 CD CD CD CD

// A program without MFC doesn't leak memory.
int _tmain(int argc, _TCHAR* argv[])
        LoggerPtr       logger  = Logger::getLogger("test");
        return 0;


This e-mail contains privileged and confidential information intended for the use of the addressees
named above. If you are not the intended recipient of this e-mail, you are hereby notified
that you must not disseminate, copy or take any action in respect of any information contained
in it. If you have received this e-mail in error, please notify the sender immediately by
e-mail and immediately destroy this e-mail and its attachments.

View raw message