lua-users home
lua-l archive

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


On Tue, Nov 24, 2015 at 6:34 PM, Philipp Janda <siffiejoe@gmx.net> wrote:

> `lua_replace` overwrites a stack slot. If that stack slot contained the last reference to a value, that value has to be finalized. The same applies to `lua_pop`, `lua_remove`, `lua_copy`, `lua_xmove`, `lua_rawget`, `lua_next`, etc.

It is not the slots that should have ref counts. Slots stay what they are. It is the objects (userdata and tables) that should have ref counts

Cheers,
V.