Hi,
I do not know details of Perl binding for Xerces-C but I think the
DOM document could be exposed via a handle in form of smart pointer
which can call transparently the release() method in its destructor.
Some sort of handle-body design pattern might do it well for this
purpose, e.g. BOOST shared_ptr<T> for example.
Cheers
Radovan
On 5/26/05, Jason E. Stewart <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am sorting out the final remaining memory issues in the 2.6 release
> of Xerces-Perl. One issue that has come up is whether it is safe to
> call delete on a DOMDocument pointer created by createDocument().
>
> According to the API docs:
>
> Users must call the release() function when finished using any
> objects that were created by the DOMImplementation::createXXXX
> (e.g. DOMBuilder, DOMWriter, DOMDocument, DOMDocumentType).
>
> If I use delete I can make the memory handling automatic, and hide it
> from users of the Perl module - if release() must be used I have to
> expose it to users of Xerces-Perl.
>
> We've tested using delete and we have no current memory problems, but
> what I'm worried about is how this will affect things in the future.
>
> Please instruct.
>
> Thanks,
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Radovan Chytracek CERN IT/ADC
mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]