in reply to Re^5: Debugger and lexicals
in thread Debugger and lexicals

Stricly speaking $a is not optimised away; it just has a short life span, as as I pointed out earlier.

Yeah, because it isn't attached to any scratchpad

Replies are listed 'Best First'.
Re^7: Debugger and lexicals
by dave_the_m (Monsignor) on Aug 07, 2011 at 15:35 UTC
    Its attached to the scratchpad of the CV that is created by compiling Foo. After Foo is executed, that CV and its scratchpad are freed, and $a gets freed at that point since there aren't any other references to it.

    Dave.