logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "山脇健一(Yamawaki Kenichi)" <k-yamaw...@carinasystem.co.jp>
Subject Memory Leak with MFC
Date Thu, 05 Nov 2009 00:23:02 GMT
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()
{
	CDialog::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;
}

thanks,
Kenichi




Mime
View raw message