lua-users home
lua-l archive

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


Was there near-universal acclaim for per-value metatables,
or am I just remembering what I like to? Anyway, pointing out
one more advantage can't hurt :-)

When a coroutine goes dead, there is often some finalizing to do.
Setting a return hook in order to call a finalizer looks kludgy.
The neat way is a __gc metamethod.