in reply to Re^2: XML-Twig: more efficient tree processing
in thread XML-Twig: more efficient tree processing

It is suppose to do that, just change:

$twig->flush;

to

$twig->purge;