lua-users home
lua-l archive

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

Am 24.11.2015 um 18:51 schröbte Viacheslav Usov:
On Tue, Nov 24, 2015 at 6:34 PM, Philipp Janda <> 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

I'm not sure I can follow. When would you update the reference counts?