My memory is a little scratchy on this subject, so bear with me - this behaviour is due to the fact that lexical variables in the argument list are bound to the scope of the
loop, and therefore aren't garbage collected until the loop is exitted. As for the lexicals in the subroutine I
loop, hence the late destruction. For a more definitive answer, you may find better luck with the