Memory Leak in ADO Connection->open()
-
Hi All, i have a sample ADO application when i test through Rational Purify it is showing that there is leak in raw_Open() function. please give me a suggestion where there is any leak in that? [I] Summary of all memory leaks... {65488 bytes, 676 blocks} [I] MPK: Potential memory leak of 18552 bytes from 147 blocks allocated in Connection15::Open(_bstr_t,_bstr_t,_bstr_t,long) [TestMemLeakADOConn.exe] Offset 0x00000008 referenced by 0x0279ffe0, a location in a HeapAlloc'd block Distribution of potentially leaked blocks Allocation location HeapAlloc [C:\WINDOWS\system32\KERNEL32.dll] Connection15::Open(_bstr_t,_bstr_t,_bstr_t,long) [d:\samples\testmemleakadoconn\debug\msado15.tli:367] } inline HRESULT Connection15::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options ) { => HRESULT _hr = raw_Open(ConnectionString, UserID, Password, Options); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _hr; } TestFunction(void) [D:\samples\TestMemLeakADOConn\test.cpp:88] m_pConn->put_ConnectionTimeout (300); => m_pConn->Open(bstrConnect, "","",-1); _CommandPtr pCmd(__uuidof(Command)); main [D:\samples\TestMemLeakADOConn\test.cpp:171] Thanks, Prashanth.v
-
Hi All, i have a sample ADO application when i test through Rational Purify it is showing that there is leak in raw_Open() function. please give me a suggestion where there is any leak in that? [I] Summary of all memory leaks... {65488 bytes, 676 blocks} [I] MPK: Potential memory leak of 18552 bytes from 147 blocks allocated in Connection15::Open(_bstr_t,_bstr_t,_bstr_t,long) [TestMemLeakADOConn.exe] Offset 0x00000008 referenced by 0x0279ffe0, a location in a HeapAlloc'd block Distribution of potentially leaked blocks Allocation location HeapAlloc [C:\WINDOWS\system32\KERNEL32.dll] Connection15::Open(_bstr_t,_bstr_t,_bstr_t,long) [d:\samples\testmemleakadoconn\debug\msado15.tli:367] } inline HRESULT Connection15::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options ) { => HRESULT _hr = raw_Open(ConnectionString, UserID, Password, Options); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _hr; } TestFunction(void) [D:\samples\TestMemLeakADOConn\test.cpp:88] m_pConn->put_ConnectionTimeout (300); => m_pConn->Open(bstrConnect, "","",-1); _CommandPtr pCmd(__uuidof(Command)); main [D:\samples\TestMemLeakADOConn\test.cpp:171] Thanks, Prashanth.v
Please be patient, and don't repost after just two hours. You will probably get an answer, but the answer might come from someone who is still asleep. Reposting the same question isn't a good idea.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson