lua-users home
lua-l archive

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


On 4/17/06, Adrian Sietsma <adrian_groups@sietsma.com> wrote:
> Will a userdata's address change when the gc runs ?

The current garbage collector is non-compacting, so no GCed objects
ever move around. IIRC, the authors have cautioned that this may not
always be the case, though a lot of current code I've seen relies on
unmoving userdata. In any case, being on the stack wouldn't affect
this; the stack is just another element of the root set for
determining reachability for GC.

Ben