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 rc...@micron.com on 2004/03/18 22:35:01 UTC

RemoveChild() Question...

Hi all,

I have a couple of question on RemoveChild() method in DOMNode class.
We are using Xerces 2.2.0.  Any help would be appreciated.


1.  After I call RemoveChild(), do I still have to call release() on the
returned object to free up the memory?

2.  What happens if I don't call a release() on the removed child
element, and the document that owned it gets released, will the memory
taken by the element node still be freed up?

Thx,

Ravin

Re: RemoveChild() Question...

Posted by Gareth Reakes <pa...@parthenoncomputing.com>.
Hi,


On Thu, 18 Mar 2004 rchauhan@micron.com wrote:

> Hi all,
>
> I have a couple of question on RemoveChild() method in DOMNode class.
> We are using Xerces 2.2.0.  Any help would be appreciated.
>
>
> 1.  After I call RemoveChild(), do I still have to call release() on the
> returned object to free up the memory?

Yes, but even if you do the memory consumption will not go down, the space
will just be available for reuse by another element. Also, not all the
memory associated with the element will be available. See the archives for
more details.

>
> 2.  What happens if I don't call a release() on the removed child
> element, and the document that owned it gets released, will the memory
> taken by the element node still be freed up?

Yes, but in this case the memory will actually be freed.

Gareth


-- 
Gareth Reakes, Managing Director            +44-1865-811184
Parthenon Computing                http://www.parthcomp.com




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