mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-06-12 20:28:42 +02:00
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). |
||
|---|---|---|
| .. | ||
| api | ||
| wplua | ||
| meson.build | ||
| module.c | ||
| script.c | ||
| script.h | ||