lua-users home
lua-l archive

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


2010/12/13 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> I think in 5.2 will become useless for all __gc hacks since __gc must be set
>> before the metatable is set.
>
> The metatable must have a __gc field when the metatable is set,
> but you may set __gc as true for instance and change it later.

Is newproxy doing that ?

Even if it does not it is useful to be able to create objects from Lua
on which all metamethods (including __len) can be implemented.