lua-users home
lua-l archive

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


Sorry, the mighty Rici is more thorough and correct again. I read that 2
would be true if one part remained (either or, not neither nor!).

:) 

-----Original Message-----
From: RLake@oxfam.org.pe [mailto:RLake@oxfam.org.pe] 
Sent: Wednesday, January 14, 2004 6:40 PM
To: Lua list
Subject: Re: Reference to table innards and GC


> 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.