vance-group/lua-voce — Issue #8: Automatically handle "destroy"
Author: rpavlik
Created: 2012-01-03 22:39:16+00:00
State: open

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.