lua-users home
lua-l archive

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

>The only major need I found with 5.0 'lua.c' concerning this was the
>capability to have library cleanups

There a trick for this that could/should be implemented in lauxlib:
Each time you open a library that needs to clean itselt up, create a userdata,
store it in the registry (using itself as both key and value), and set up a GC
method for this userdata that does the cleanup. When lua_close is called, your
GC method will be called automatically.