You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Greg Matthews <gm...@flex.com.au> on 2000/07/03 07:55:05 UTC

remove a treewalker from a doc, Xerces1.1.1

What's the best way to remove a TreeWalker from a Document?

I have a Document that stays in memory and gets traversed 
occasionally.

I used to cast the TreeWalker to a TreeWalkerImpl and call
impl.removeTreeWalker( tw ); but that doesn't exist any more.

thanks,
greg



Re: remove a treewalker from a doc, Xerces1.1.1

Posted by Arnaud Le Hors <le...@jtcsv.com>.
> Greg Matthews wrote:
> 
> What's the best way to remove a TreeWalker from a Document?

You don't need to. Just release your reference and it will eventually be
garbage collected.

> I have a Document that stays in memory and gets traversed
> occasionally.
> 
> I used to cast the TreeWalker to a TreeWalkerImpl and call
> impl.removeTreeWalker( tw ); but that doesn't exist any more.
 
It was removed because it's not necessary. This call is still necessary
for NodeIterators though.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group