After processing certain amount of Document i am receiving error
"Not enough storage available to complete operation" For LoadXML Method
The program flow goes like this
1. I have a class which initialise the IXMLDOMDOCUMENT in
constructor
2. the same class has a method UpdateDOM() which refer the IXMLDOMDocument
created in Constructor as below
void UpdateDom(string xmldata)
{
VARIANT_BOOL whatisresult;
BSTR bstr_XMLContent = SysAllocString(xmldata);
HRESULT hr = pXMLDom->loadXML( bstr_XMLContent, &whatisresult);
// code to Iterate inside the DOM and update few node
// code to cleanup
}
and UpdateDom is in a loop and is called quite a many times
after processing say 70 to 80K documents LoadXML returns
"Not enough storage available to complete operation" error ..
What could be the possible cause.
cant we use LoadXML so much time on the same interface of IXMLDOMDocument ?
Wiill it be good idea to create and delete IXMLDOMDOCUMENT every time i
come inside UpdateDom function ?
Or should i release IXMLDOMDOCUMENT interface after getting such error build
it again ?
>BSTR bstr_XMLContent = SysAllocString(xmldata);
?
Dave