lua-users home
lua-l archive

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


On Fri, Dec 13, 2013 at 11:19 PM, Ulrich Schmidt <u.sch.zw@gmx.de> wrote:
> This shows me both tables t1/t2 points to the same table tx. let's think
> about what happens if i would do a T2:clear():
> In case the clear clear function wants to free all t2 entries immediately,
> the clear function needs to check double references for each table item of
> type table/function.

Why would it FREE all T2 entries immediately? It can just orphan them,
and then they'll get collected next sweep, and when that happens, __gc
will run.

/s/ Adam