[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Memory Leak with IXMLDOMNode::selectSingleNode method
- From: gramanan@edify.com
- To: xml-dev@lists.xml.org
- Date: Thu, 28 Jun 2001 16:18:49 -0700
Hi All,
I'm experiencing a memory leak of ~8K when I use the
IXMLDOMNode::selectSingleNode method. I've provided the code snippet below.
CComPtr<IXMLDOMNode> spResultNode = NULL;
HRESULT hr;
#ifdef XMLUSEIMPORTLIB
hr = pCurrentCursorNode->raw_selectSingleNode(wstrPattern,
&spResultNode);
#else
if(FAILED(pCurrentCursorNode->selectSingleNode(wstrPattern,
&spResultNode)) )
return XMLInternalCOMError;
#endif
I'm using the MSXML 2.5 parser [msxml.dll version : 8.00.5226.0]. I suspect
the memory leak is because spResultNode doesn't get deallocated even after
it goes out of scope.
Can someone tell me what I'm doing wrong? I tried using IXMLDOMNode *
instead of the smart pointer. that didn't help either. I do hope there's
someone out there who can help me.
thanks,
Gayatri