lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I'm making a Lua module for a C library that needs to free resources when the application is done. Am I right in thinking that the best way to do this is to put a userdata 'sentry' in the module table, and free the resources on this sentry's __gc metamethod? Or is there a callback for this already in the module system?

Thanks