[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Order of weak ref removal and __gc
- From: Pablo Pissanetzky <pablo@...>
- Date: Mon, 16 Aug 2010 12:36:31 -0700
> Another solution is to keep the current global weak table, but to add
> another table only to control the indices. This table is strong, and
> associates indices being used to true. When a new userdata creates a
> new index, it queries this table to check for a free index. Only when
> a userdata finalizes, it removes its corresponding index from this table,
> and only then that index can be reused.
Roberto,
Thanks for your help. I ended up doing what you suggested above and it is
sufficient.