You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Kris Dudkiewicz <kr...@orad.pl> on 2005/11/04 18:55:18 UTC

Erroneous DOMPrint example ?

Hello,

I have just started using XercesC which is a kind of nice experience.

This is part of DOMPrint.cpp (as of XercesC ver. 2.7.0):

437:             DOMWriter         *theSerializer = 
((DOMImplementationLS*)impl)->createDOMWriter();
....
497:             delete theSerializer;

However, according to the documentation what would be required here is

theSerializer->release();

See http://xml.apache.org/xerces-c/program-dom.html :

Objects created by DOMImplementation::createXXXX       Users must call 
the release() function when finished using any objects that were created 
by the DOMImplementation::createXXXX (e.g. DOMBuilder, DOMWriter, 
DOMDocument, DOMDocumentType).

Who is correct ? The sample or documentation ?

Best regards,
Kris.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Erroneous DOMPrint example ?

Posted by Gareth Reakes <ga...@embracemobile.com>.
Hi Kris,

Kris Dudkiewicz wrote:
> Hello,
> 
> I have just started using XercesC which is a kind of nice experience.
> 
> This is part of DOMPrint.cpp (as of XercesC ver. 2.7.0):
> 
> 437:             DOMWriter         *theSerializer = 
> ((DOMImplementationLS*)impl)->createDOMWriter();
> ....
> 497:             delete theSerializer;
> 
> However, according to the documentation what would be required here is
> 
> theSerializer->release();

In this case it makes no difference but we should standardize on the 
release call. I will change the sample program. Thanks for the report.


Gareth


-- 
Gareth Reakes, Managing Director           Embrace Mobile
+44-1865-811197              http://www.embracemobile.com

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org