Is it possible to get destructors in Lua w/o using userdata?
http://www.lua.org/notes/ltn006.html looks promising (in fact exactly what I want); except it’s a path for Lua 4.0.
Basically, I want a way to have a function called when a table is collected.
Thanks!
From the documentation on metatables:
The Lua Users’ Lua FAQ states:
So there you go, you will have to manually wrap your tables in userdata if you want to get the
__gcevent.