I was checking our code using DOM API. We parse only so this may be a
different use case than yours, but we do not release the Document
object but call parser.reset() instead which in consequence performs
the memory cleanup as well. I had to change the code which was calling
release() or delete() before but was crashing on the CERN
ScientificLinux 3.0 (RHEL3 equivalent). Check the the DOM
parser.reset() call code to see what it does.

Cheers

         Radovan

On 5/26/05, Gareth Reakes <[EMAIL PROTECTED]> wrote:
> Hey,
> 
>        Wrote a short one
> 
> http://blog.parthenoncomputing.com/xerces/archives/2005/05/memory_manageme.html
> 
> Please give comments. This comes up now and again so its worth spending
> a bit of time on to make it understandable.
> 
> Gareth
> 
> 
> Jason E. Stewart wrote:
> > Radovan Chytracek <[EMAIL PROTECTED]> writes:
> >
> >
> >>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.
> >
> >
> > Hi Radovan,
> >
> > I'm really looking to understand the consequences of release() versus
> > delete() first. After that I can work on the implementation.
> >
> > Is calling delete good enough? Or is it critical to call release()?
> >
> > Cheers,
> > jas.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> Gareth Reakes, Managing Director      Parthenon Computing
> +44-1865-811184                  http://www.parthcomp.com
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to