http://qs321.pair.com?node_id=1159122


in reply to Re^2: "goto" memory leak
in thread "goto" memory leak

there is at least one scope that never releases its memory.

In your original program, yes. It never releases memory, but that memory is still needed. That doesn't meet the definition of a leak.

Keep in mind that the run-time effect of

my $i;
is similar to
Hook::Scope::POST(sub { $i = undef });

It pushes an instruction on the stack to clear the scope on exit (which could happen, say, if an exception occurs).