[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Question regarding GC of udata across states
- From: Olivier Hamel <evilpineapple@...>
- Date: Sun, 17 Jan 2010 15:49:40 -0500
Greetings,
Let's say I create a udata in the root state of a Lua instance. I then
anchor it down by adding a reference to it in the registry of the root
state. Later, it gets passed around to other coroutines and all
references to it disappear in the root state except the one in the
registry. It won't be collected by the root state, but what happens if
all references to it disappear in the substate it was passed to? Could
it be potentially collected by the substate, regardless that it's still
in reference by the registry of the root state?
I haven't yet encountered such a problem, but I've only been able to
conduct limited tests, and the Lua src is somewhat hard to follow when
you're not used to where everything is.
Olivier Hamel