lua-users home
lua-l archive

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


Weak-keyed tables in Lua 5.1 will mark all of their values. So, the callback functions get marked which marks their upvalues which keeps col alive and conceivably button as well.

Lua 5.2 is supposed to address this, but a better solution is probably to use the fenv tables for userdata because this avoids the repeated marking and scanning cycles the Lua 5.2 solution needs to make as part of the atomic phase and because it's available and works now. (The Lua 5.2 solution is far better than the situation in 5.1, but one still should probably look for other options where possible.)

Mark