lua-users home
lua-l archive

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


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

> That's what I assumed, but then `lua_replace` (and the others mentioned), which overwrites a stack slot, can cause a reference count to become 0.

An object's reference count is not directly affected by doing anything to stack slots. Some additional logic is required to manipulate the reference counts of the objects involved. This logic needs to be correct. If you think it can never be correct in certain cases, please give us an example illustrating your point.

Cheers,
V.