Hi there.
I've done that, but the program keeps dumping.
I attach a sample source-code. To make the program fail, compile it and
simply make a call stating three names of non-trivial XML documents, (10kb
are enough). I need to know if what is happening is a Xerces error(I do not
think so), a GNU GCC 2.95.2 error (maybe), SCO Openserver error (using
NO_THREADS my have something to do with the memory freeing?), or some kind
of mistake on my own code.
Please, if anyone can test this code in their enviroments I'll be very
interested in the results.
Thak you.
Jorge.
P.D. To see the stack callback status, please check my original mail within
this list.
> The DOMDocument destructor is called implicitly AFTER the Xerces is
> terminated. This will cause problem. Please
> nest the DOM code in an inner block so that reference counting recover all
> document storage when this inner block
> exits, before Terminate is called.
>
> main{
> Xerces::Initialize;
> { //<==== add this
> DOMParser parser = new DOMParser;
> DOMDocument doc1;
> DOMDocument doc2;
> DOMDocument doc3;
> [...]
> parser->parse(file1);
> doc1 = parser->getDocument();
> delete parser;
> parser = new DOMParser;
> parser->parse(file2);
> doc2 = parser->getDocument();
> delete parser;
> parser = new DOMParser;
> parser->parse(file3);
> doc3 = parser->getDocument();
> delete parser;
> [...]
> printDoc1; // Almost same code as DOMPrint
> printDoc2; // Almost same code as DOMPrint
> printDoc3; // Almost same code as DOMPrint
> [...]
> } //<==== add this
> Xerces::Terminate;
> }
>
> Please see FAQ http://xml.apache.org/xerces-c/faq-parse.html#faq-29 for
> further detail.
>
> Tinny
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ****************************************************************
> Este mensaje ha sido analizado con una herramienta
> de deteccion de virus para su seguridad.
> Ministerio Justicia
> ***************************************************************
**********************************************************************
Este mensaje ha sido analizado con una herramienta de
deteccion de virus para su seguridad.
Ministerio de Justicia
www.mju.es
**********************************************************************
test.cpp
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
