On Tue May 04 17:09:14 2010, andrew@pimlott.net wrote:
Show quoted text> I just happened to look at the Twig DESTROY function. It looks like
> there is an attempt to completely clear out the Twig object:
>
> $t={}; # prevents memory leaks (especially when using mod_perl)
> undef $t;
>
> It it had worked, my memory leak would not have happened. However,
> this
> code doesn't actually do anything useful. It points $t to some new
> hash, then unsets it. This has no effect on the Twig object. For
> that,
> you probably want to empty the hash representing the Twig:
>
> %$t = ();
>
> If you do that (and it seems like a good idea to me), you can remove
> all
> the undef lines as they will be redundant.
I did %$t = (); although I am not quite certain that really helps.
That's in XML::Twig 3.35
I would need more time to investigate potential memory leaks due to
handlers not being freed, but I don't have much at the moment. Let me
know if the new version fixes the problem for you, and if not I'll have
a look at it.
Thanks
__
mirod