[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: order of destruction of variable by the garbage collector
- From: "Adam D. Moss" <adam@...>
- Date: Wed, 21 Jan 2004 10:23:47 +0000
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."