[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 <email@example.com>
2011/6/27 steve donovan <firstname.lastname@example.org>:
But the original environment is unreachable (except by the gc_mt.__gc
> On Mon, Jun 27, 2011 at 11:08 AM, Gaspard Bucher <email@example.com
>> 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 ?