I know that Lua is gc-ed. I know that Lua can process c objects through user data.
Here is my question: is there a way to register a function so that it is called when the userdata C object was gc-ed from lua? [In principle, a destructor].
Thank!
source
share