[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: setfenv
- From: "D Burgess" <db@...>
- Date: Mon, 13 Oct 2003 9:51:32 +1000
Hoping for some help here.
<code>
function func()
a=1;
end
g={}
setfenv(func, setmetatable(g, {__index=_G}))
</code>
What is the correct way to tidy up from here?
Is it necessary to issue another setfenv() before
setting g or func to nil?
Is func collectable after setting its value to nil or
does the setfenv() continue to reference func()? i.e.
should we tidy up with
setfenv(func, original_env);
DB