lua-users home
lua-l archive

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


Hi,
I frequently see casual mention that the gc will collect something "eventually" or "sometime later". Does this hold true when calling lua_setgcthreshold(L, 0) in Lua 5.0 as well? Or does the fact the threshold is zero indicate that the nil keys and values will be collected when the gc runs?

I know the gc will _run_ when lua_setgcthreshold is called with a threshold of zero, I just want to know if _all_ nil keys/values will actually be collected then, or whether it takes some time or number of lua_setgcthreshold calls before it actually collects them. E.g. does calling lua_setgcthreshold multiple times in a row do anything after the initial call.

Thanks,
Brett