wireplumber/modules/module-lua-scripting
Julian Bouzas a824ae910f m-lua-scripting: only hold a strong reference of the Lua state when the script is enabled
Scripts are always deactivated (and not finalized) before core disconnects, so
we need to make sure the scripts don't hold a strong reference when creating
them. They must only hold a strong reference of the Lua state if activated.

In order to implement this properly, the lua_State has been wrapped into a
GObject so that the 'lua-engine' construct-only property is a weak reference of
the Lua state. Then, when the script is activated, a strong reference of the Lua
state is held so the script can work. This strong reference is later dropped
when the script is deactivated (right before the core is disconnected), avoiding
leaked proxy warning messages in the log if a script has a global variable
holding a proxy (Eg the alsa monitor in alsa.lua).
2026-06-01 07:37:02 -04:00
..
api m-lua-scripting: validate Bool values in Pod.Choice.Enum 2026-06-01 09:42:26 +00:00
wplua m-lua-scripting: only hold a strong reference of the Lua state when the script is enabled 2026-06-01 07:37:02 -04:00
meson.build wplua: move under modules/module-lua-scripting 2022-03-24 09:47:59 +02:00
module.c m-lua-scripting: only hold a strong reference of the Lua state when the script is enabled 2026-06-01 07:37:02 -04:00
script.c m-lua-scripting: only hold a strong reference of the Lua state when the script is enabled 2026-06-01 07:37:02 -04:00
script.h m-lua-scripting: wrap every script in a WpPlugin and expose async activation api 2022-04-23 20:14:59 +03:00