[odb-users] memory leak detected

steve xu steve.xu.cd at gmail.com
Sun Sep 23 14:18:20 EDT 2012


Hi

I am a newbie for ODB library, I have a project use ODB with mysql support.
When I compile a simple application with MFC framework, the memory leak is
detected, but when i compile the application with win32 console, it has no
memory leak.
 follow is the logs from the Visual studio 2008 ouput window:
"mfctest.exe”: "E:\Temp\ODB\odb-study\hello\Debug\mfctest.exe”,
"mfctest.exe”: "C:\Windows\System32\ntdll.dll”
"mfctest.exe”: "C:\Windows\System32\kernel32.dll”
"mfctest.exe”: "C:\Windows\System32\KernelBase.dll”
"mfctest.exe”:
"E:\Temp\ODB\odb-study\hello\Debug\odb-mysql-d-2.0-vc9.dll”,
"mfctest.exe”: "E:\Temp\ODB\odb-study\hello\Debug\odb-d-2.0-vc9.dll”,
"mfctest.exe”:
"C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcr90d.dll”
"mfctest.exe”:
"C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcp90d.dll”,
"mfctest.exe”: "E:\Temp\ODB\odb-study\hello\Debug\libmysql.dll”
"mfctest.exe”: "C:\Windows\System32\user32.dll”
"mfctest.exe”: "C:\Windows\System32\gdi32.dll”
"mfctest.exe”: "C:\Windows\System32\lpk.dll”
"mfctest.exe”: "C:\Windows\System32\usp10.dll”
"mfctest.exe”: "C:\Windows\System32\msvcrt.dll”
"mfctest.exe”: "C:\Windows\System32\advapi32.dll”
"mfctest.exe”: "C:\Windows\System32\sechost.dll”
"mfctest.exe”: "C:\Windows\System32\rpcrt4.dll”
"mfctest.exe”: "C:\Windows\System32\ws2_32.dll”
"mfctest.exe”: "C:\Windows\System32\nsi.dll”
"mfctest.exe”: "E:\Temp\ODB\odb-study\hello\Debug\db.dll”,
"mfctest.exe”:
"C:\Windows\winsxs\x86_microsoft.vc90.debugmfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2f2f658c522a659b\mfc90ud.dll”,
"mfctest.exe”: "C:\Windows\System32\shlwapi.dll”
"mfctest.exe”:
"C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll”
"mfctest.exe”: "C:\Windows\System32\msimg32.dll”
"mfctest.exe”: "C:\Windows\System32\oleaut32.dll”
"mfctest.exe”: "C:\Windows\System32\ole32.dll”
"mfctest.exe”: "C:\Windows\System32\imm32.dll”
"mfctest.exe”: "C:\Windows\System32\msctf.dll”
"mfctest.exe”: "C:\Windows\System32\nlaapi.dll”
"mfctest.exe”: "C:\Windows\System32\NapiNSP.dll”
"mfctest.exe”: "C:\Windows\System32\pnrpnsp.dll”
"mfctest.exe”: "C:\Windows\System32\mswsock.dll”
"mfctest.exe”: "C:\Windows\System32\dnsapi.dll”
"mfctest.exe”: "C:\Windows\System32\winrnr.dll”
"mfctest.exe”: "C:\Windows\System32\rasadhlp.dll”
"mfctest.exe”: "C:\Windows\System32\uxtheme.dll”
"mfctest.exe”: "C:\Windows\System32\dwmapi.dll”
"mfctest.exe”:
"C:\Windows\winsxs\x86_microsoft.vc90.mfcloc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_49768ef57548175e\MFC90CHS.DLL”,未使用调试信息生成二进制文件。
"mfctest.exe”: "C:\Windows\System32\shell32.dll”
"mfctest.exe”: "C:\Windows\System32\cryptbase.dll”
"mfctest.exe”: "C:\Windows\System32\clbcatq.dll”
Detected memory leaks!
Dumping objects ->
{143} normal block at 0x00645670, 40 bytes long.
 Data: <                > 03 00 00 00 00 00 00 00 CD CD CD CD 00 CD CD CD
{142} normal block at 0x00645600, 52 bytes long.
 Data: < Rd  Td  Rd     > F0 52 64 00 B0 54 64 00 F0 52 64 00 00 00 00 00
{141} normal block at 0x00645590, 52 bytes long.
 Data: < Ud  Sd `Sd     > 20 55 64 00 D0 53 64 00 60 53 64 00 00 00 00 00
{140} normal block at 0x00645520, 52 bytes long.
 Data: < Rd  Ud  Rd     > F0 52 64 00 90 55 64 00 F0 52 64 00 00 00 00 00
{139} normal block at 0x006454B0, 52 bytes long.
 Data: <@Td  Sd  Vd     > 40 54 64 00 D0 53 64 00 00 56 64 00 00 00 00 00
{138} normal block at 0x00645440, 52 bytes long.
 Data: < Rd  Td  Rd     > F0 52 64 00 B0 54 64 00 F0 52 64 00 00 00 00 00
{137} normal block at 0x006453D0, 52 bytes long.
 Data: < Td  Rd  Ud     > B0 54 64 00 F0 52 64 00 90 55 64 00 00 00 00 00
{136} normal block at 0x00645360, 52 bytes long.
 Data: < Rd  Ud  Rd     > F0 52 64 00 90 55 64 00 F0 52 64 00 00 00 00 00
{135} normal block at 0x006452F0, 52 bytes long.
 Data: <@Td  Sd `Sd     > 40 54 64 00 D0 53 64 00 60 53 64 00 CD CD CD CD
{134} normal block at 0x00645288, 40 bytes long.
 Data: <        HRd  wRQ> 01 00 00 00 04 00 00 00 48 52 64 00 E9 77 52 51
{133} normal block at 0x00645248, 1 bytes long.
 Data: < > 00
{131} normal block at 0x00645130, 24 bytes long.
 Data: <         wRQ    > 01 00 00 00 04 00 00 00 E9 77 52 51 00 00 00 00
{130} normal block at 0x006450B0, 68 bytes long.
 Data: < Pd  Pd  Pd     > B0 50 64 00 B0 50 64 00 B0 50 64 00 CD CD CD CD
{129} normal block at 0x00645058, 28 bytes long.
 Data: <                > 00 00 00 00 CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.

Steve



More information about the odb-users mailing list