[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: order of destruction of variable by the garbage collector
- From: didier@...
- Date: Wed, 21 Jan 2004 15:15:09 +0100 (CET)
thanks for your help,
but frankly I've not really understood how the weak tables are working
I guess the code I wrote is working for small amounts of data but
I'm not sure of what would happened if several gc occured during the
processing.
> 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."
>