Thanks Alberto,
I used resetDocumentPool(),
But I get a run time error R6025 pure virtual function call.
Thanks and regards
Sree Harsha Vardhana S.N
On 2/27/08, Alberto Massari [EMAIL PROTECTED] wrote:
Hi Sree,
you should invoke resetDocumentPool(), not reset(). As for the code you
posted
Thanks for the tip on releasing the XMLstring memory ... there was a
reduction in the use of memory...
please tell me why i am getting an error when i resetDocumentPool();
I get a run time error R6025 pure virtual function call
thank you
On 2/27/08, Sree Harsha [EMAIL PROTECTED] wrote:
Sree Harsha wrote:
Thanks Alberto,
I used resetDocumentPool(),
But I get a run time error R6025 pure virtual function call.
When/where do you call resetDocumentPool? And where do you get the pure
virtual function call? Are you attempting to access one of the DOM tree
that you have just
XercesDOMParser parser_;
do
{
/*create a source file */
/*During the next iteration the following code will give runtime error*/
parser_.parse(source);
xercesc::DOMDocument* xmlDoc = parser_.getDocument() ;
/*How to release the memory allocated to the DOMDocument pointer*/
/*parse the
/*Here is how the code looks like*/
XercesDOMParser parser_;
do
{
/*code to create a source file */
/*During the next iteration the following code will give runtime error*/
parser_.parse(source);
xercesc::DOMDocument* xmlDoc = parser_.getDocument() ;
/*code to parse the file source*/
I haven't examined the reset code, but I'd expect the document to be
released when you reset the parser (unless you adopt the document via a
call to adoptDocument(), in which case it's your responsibility to
release it).
Given that you're processing huge files, you should consider using a SAX
Thanks for your reply, but still the memory consumption has not come down.
Is there any way i can reuse DOMDocument variable also like in the following
snippet...
do
{
/*create a source file */
parser_.parse(source); //parser_ is a XercesDOMParser object
xercesc::DOMDocument* xmlDoc =