Thanks
adoptDocument is a good solution.

-----Messaggio originale-----
Da: Alberto Massari [mailto:[email protected]]
Inviato: giovedì 8 gennaio 2009 15.13
A: [email protected]
Oggetto: Re: R: R: parse memory leak


> Now I keep track also of the XercesDOMParser obejct and I delete it, and I 
> have no more memory leak.
>
> By the way, if I have a DOMDOcument object create using 
> XercesDOMParser->getDocmennt(), is there a DOMDocument obejct which return me 
> a reference to the original XercesDOMParser object ?
>   

No, you cannot get the parser from the document; but you can use 
adoptDocument instead of getDocument, so that you can release the parser 
as soon as the parsing ends, and later release the document when you are 
done with it. Otherwise, using getDocument, you must *not* release the 
document because it will be automatically released when releasing the 
parser.

Alberto




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to