mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
36134e6373
Lua 5.3 has the ability for scripts to define __gc metamethods on tables, which gives them the ability to "resurrect" userdata after __gc has been called. This means, __gc can be called multiple times on userdata. This commit protects against this by simply panicking on access after resurrection. This is possibly not the best approach?