lua-users home
lua-l archive

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



> Taking the examples into account, are the above statements correct?

No. Statements 1 and 3 are correct, but statement 2 is incorrect: what you call the "outer table" will be eventually garbage collected because no reference to it remains.

There is actually no such thing as an "inner" table: there are two tables, one of which includes a reference to the other. (So the global variable inner in example two does not reference the "innards" of anything.)

R.