|
On 2021-11-28 14:31, Roberto Ierusalimschy wrote:
This table has a metamethod __gc that dlclose's all libraries in that table. As the table is in the registry, it is never collected, so that it is called only when we close the Lua state. Because this table is created and marked before we can load any C module, it will be collected after the collection of any object created by any C module.
Thanks. I think this solves my problem. Am I right in thinking that I should avoid requiring any C-modules in a coroutine? That would not be a hardship.