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
is similar tomy $i;
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).
In Section
Seekers of Perl Wisdom