lua-users home
lua-l archive

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


2010/5/21 Peter Cawley <lua@corsix.org>:
> newproxy(true) will return a userdata with a new metatable, and it
> initialises the __gc field of that metatable to the value false prior
> to setting the metatable. Hence as __gc is non-nil at the moment of
> metatable setting, the new userdata will be placed on the appropriate
> list. __gc is then changed from false to print, and so print will get
> called at collection time.

So it's not a problem that __gc has the value false at collection time
? Is that already the case in 5.1 ?