in reply to
Re^4: XML::Twig to mysql totally lost
in thread XML::Twig to mysql totally lost
The purge in your handler releases the memory by deleting everything but the direct ancestors of the current element. The flush is used when you want to output the transformed XML, by using flush in handlers. Then you need to flush what remains in memory after you're done parsing. At least with old versions of the module, recent versions take care of this automatically.
So the short answer is: yes you can delete it.