lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Jun 23, 2019 at 1:59 PM Dirk Laurie <dirk.laurie@gmail.com> wrote:
Is there any good, sound reason why a local variable needs to remain
in limbo after it has gone out of scope?

Not the variable, but the value that it has.

If the value has made its way into an upvalue, a table or something else that made its lifetime non-local, closing it upon its leaving the local scope might be premature.

I have advocated the use of reference counting as a way to make this whole issue more or less taken care of automatically and with minimal impact on existing Lua code and libraries.

Cheers,
V.