lua-users home
lua-l archive

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


> A small correction: You can assume that, among udata being collected in
> the same cycle, their GC metamethods are called in reverse order of
> their creation. That is valid during lua_close, too.

Thanks. I thought they were garbage collected in order by tag in 4.0.1, but
I couldn't remember for sure.

Regardless, I wouldn't feel comfortable counting on the order of deletion
because it might change in some future version. This is a much-debated
theme about finalisation methods and the usual suggestion is that safe
coding requires making as few assumptions as possible. That is what I was
trying to communicate.

Rici.