vancegroup / lua-voce

Lua binding to Voce
Boost Software License 1.0
2 stars 0 forks source link

Automatically handle "destroy" #8

Open rpavlik opened 12 years ago

rpavlik commented 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.