Open rpavlik opened 12 years ago
We can do this by creating a table with a custom __gc method in its metatable that calls destroy, and putting it in the lua registry in a safe place. Then, destroy will be called automatically when the state is closed.
__gc
We can do this by creating a table with a custom
__gc
method in its metatable that calls destroy, and putting it in the lua registry in a safe place. Then, destroy will be called automatically when the state is closed.