Hi All, i'm using IXMLDOMDocumentPtr for loading xml and do operations on it. when i run my application with purify it is showing a memory leak in CreateInstance & loadXML. please give me a suggestion where am i wrong? or what changes i need to do. here is my sample code: BSTR bstrUserInputsXml=NULL; { CoInitialize(NULL); IXMLDOMDocumentPtr pXMLDom=NULL; hr=pXMLDom.CreateInstance( "Microsoft.XMLDOM" ); //hr=pXMLDom.CreateInstance( __uuidof(MSXML2::DOMDocument40)); if(FAILED(hr)) { //cout<<"Failed to instantiate DOMDocument40"<load("D:\\userinputs1.xml")!= VARIANT_TRUE) { //MessageBox(NULL,"Failed load xml string","KeyTable.s",MB_OK); return ; } bstrUserInputsXml = pXMLDom->xml; pXMLDom.Release(); CoUninitialize(); } Thanks in advance. Prashanthv -- modified at 14:02 Friday 27th April, 2007
voorugonda prashanth
Posts
-
Regarding MSXML3.0 [modified] -
Memory leak in ADO CreateParameterHi All, when i rational purify it is showing a memory leak in ADO CreateParameter method. is there really any memory leak? please do the needful help.
-
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
-
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
-
memory leak in IXMLDOMDocumentHi All, when i call loadXML there is some memory leak. please give me a solution to avoid memory leak.
-
memory leak in ADO Connection & Excute methodsHi All, please suggest me how to avoid memory leak ADO.
-
Maximum request length exceeded while uploading filei mean every message is follwed by statements like "asdfasdf..." or "fghdfghdgfh..". this normally done when u go for training for learning type.
-
Virtual memory Problem [modified]hi, i'm not using malloc or new in my application. i'm using only vectors of class objects allocated on stack itself. i dont see any problem with vectors of class objects allocating on stack. steps: 1) client application talks to the component 2) which internally talks DBHandler component which connects to SQL Server and returns the result back. 3) the result i'm storing in vectors for processing. 4) return back to the client. i'm not able get what exactly the problem is??
-
Maximum request length exceeded while uploading filetill now u didn't clear your typing test?
-
Maximum request length exceeded while uploading filehi keerthi, does aspnet_wp.exe in server will be closed any time?
-
aspnet_wp.exe problemno memory leaks in my component.
-
aspnet_wp.exe problem -
Virtual memory Problem [modified]Hi All, i have a vc++client and i'm using com components having business logic. Problem: i'll not close the client application. but the virtual memory accupied by the process is not freed. when it reaches maximum of virtual memory client application crashes. please give me the solution what to do avoid crashing. Thanks in Advance. Prashanth. -- modified at 2:58 Friday 2nd February, 2007
-
how to access a COM component from ASP.net?hi all, how to access a COM component developed in vc++6.0 from ASP.net? what r the issues need to be considered in this case?? Thanks in advance. Prashanth.v
-
Need to read value from config filehi Shilpa, how to access a COM component developed in vc++6.0 from ASP.net? what r the issues need to be considered in this case?? Thanks in advance. Prashanth.v
-
how to access a COM component from ASP.net?hi all, how to access a COM component developed in vc++6.0 from ASP.net? what r the issues need to be considered in this case?? Thanks in advance. Prashanth.v
-
how to access a COM component from ASP.net? [modified]hi all, how to access a COM component developed in vc++6.0 from ASP.net? what r the issues need to be considered in this case?? Thanks in advance. Prashanth.v -- modified at 4:59 Monday 30th October, 2006
-
Error while returning value from try blockhi all, when i'm returning a value from a try block of function, control is jumping in to catch block. thanks in advance. Regards, Prashanth -- modified at 5:32 Monday 23rd October, 2006
-
Identifying Dynamic Controls clickwhich application it is??(MFC APP)
-
any one from hyderabad?good.