Here's an answer about this problem from the p5p list. Looks like this bug is simply a known issue and will be fixed come 5.10.
-dave ---------- Forwarded message ---------- Date: Sun, 8 Oct 2006 10:52:35 +0100 From: Dave Mitchell <[EMAIL PROTECTED]> To: Dave Rolsky <[EMAIL PROTECTED]> Cc: perl5-porters@perl.org Subject: Re: (Very) nested subref leak in 5.8.8? On Sat, Oct 07, 2006 at 02:36:17PM -0500, Dave Rolsky wrote: > I think I've found a leak in a fairly funky use of nested closures in Perl > 5.8.8. I found it trying to track down a problem in Mason, I've narrowed > it down to a fairly small example. or even the smaller example: sub { my $object = Object->new(); sub { $object; sub { $object }; }; }->(); > This sure looks like a Perl bug, but I've been wrong before. I'd > confirmation or correction here. It a bug in perl. It been fixed in the 5.9.x branch, (by rewriting the lexical/closure code from scratch), but not backported to 5.8.x as it was too big a change. > Is there any obvious way that I could make $thing clean up $object? That'd > help fix the bug in Mason, at least. Unfortunately, tickling this bug in > when you use Mason isn't all _that_ hard. Not really. The 5.8.x code has lots of subtle closure bugs, which can generally be triggered or avoided by slight changes to the code. -- My Dad used to say 'always fight fire with fire', which is probably why he got thrown out of the fire brigade. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users