lua-users home
lua-l archive

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


See section 2.9.1 of the manual.  __gc metamethods are
collected in reverse order of creation, for data that is collected
in the same gc cycle.  If you additionally want to ensure that one
userdata will always live at least as long as another, try using
a weak-keyed/valued table (see section 2.9.2).

--Adam
--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
"At this point the rocket becomes engorged with astronauts."