[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: 5.2 _ENV garbage collection question
- From: Gaspard Bucher <gaspard@...>
- Date: Mon, 27 Jun 2011 12:26:31 +0200
On Mon, Jun 27, 2011 at 11:29 AM, Jerome Vuarand <firstname.lastname@example.org>
2011/6/27 steve donovan <email@example.com>:
But the original environment is unreachable (except by the gc_mt.__gc
> On Mon, Jun 27, 2011 at 11:08 AM, Gaspard Bucher <firstname.lastname@example.org
>> collectgarbage() ---- does not collect old "foo". Why ? Where is it stored ?
>> print('end') -- the garbage collection after 'end' removes old "foo".
> It's still there, as a global of the original environment.
function itself), and it should be collected.
Yes, this was my concern: I thought the original _ENV was unreachable but it is not: since "foo" is not garbage collected, it must be reachable from somewhere (which means the original _ENV is also reachable). Therefore, the question is from where is old _ENV reachable and why ?