lua-users home
lua-l archive

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


And one more thing.How exactly does garbage collection work?Say I have
the __newindex metamethod set to a function of mine and I call
something  like s="string" in lua.This might assign string to s if it
is a lua var or might copy the char * internally if it is a c var.Does
the garbage collector collect the "string" string if it did not get
assigned to a lua var or does he consider the value used(by s whatever
that may be) and therefore not to be collected until another
assignment to s?In the second case my troubles might be over.

Dimitris