Right now, we are defining __gc metamethods in the metatable of the userdata that holds the Harfbuzz objects. However, there is a possibility that these will be called prematurely if a local Lua userdata object goes out of scope, even as it is being used by another Harfbuzz type. This introduces subtle failure cases which will be very hard to track down.
We need to have a better plan with regards to Garbage collection.
Right now, we are defining
__gcmetamethods in the metatable of the userdata that holds the Harfbuzz objects. However, there is a possibility that these will be called prematurely if a local Lua userdata object goes out of scope, even as it is being used by another Harfbuzz type. This introduces subtle failure cases which will be very hard to track down.We need to have a better plan with regards to Garbage collection.