At 15:50 15/03/2001 -0300, Jason Leidigh wrote:
>I was able to clean up a number of errors which seemed as
>though they were indeed causing leaks. For example:
>
>$regex = qr'xx?'i;
>
>Causes the following error:
>
>(?i-xsm:xx?) can't `Regexp::DESTROY'
AUTOLOADs will catch DESTROYs, the latter being called on every object
destruction (I never noticed that they were called on regexen, that's
nice). Chances are, unless you clearly see a memory leak with DESTROYs
(which are expected not to be found most of the time) then your AUTOLOAD
should probably explicitly ignore them.
Another solution is:
sub Regexp::DESTROY {}
sub Apache::DESTROY {}
etc...
-- robin b.
"Science is like sex: sometimes something useful comes out, but that is not
the reason we are doing it." -- R. Feynman