lua-users home
lua-l archive

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


2014-08-01 21:13 GMT+02:00 Coda Highland <chighland@gmail.com>:
> On Fri, Aug 1, 2014 at 12:08 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:

>> What would such an API function do? Traverse the whole table and
>> set every value to nil, in order to adjust the reference count.
> Is that the only way to achieve it? Is there not a way to simply
> disown the contents of the table and leave it for GC? I mean, even if
> it's "create new empty table, swap internal data pointers, let new
> table go unreferenced" that would be faster than a loop -- and it
> would be something that couldn't be achieved by Lua code.

I've had a look through lgc.c, and could not find anything
that would support that. Mind you, all that white/gray/black
business is a bit beyond me anyway.