mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
remove hooks from objects
Remove the hooks we installed on objects in the destroy/free event or before calling _destroy. This is not really needed but it is a nice thing to do because it calls the hook removed callbacks.
This commit is contained in:
parent
6317bc4deb
commit
1570e62635
19 changed files with 109 additions and 27 deletions
|
|
@ -127,8 +127,12 @@ static void object_destroy(struct object *o)
|
|||
struct manager *m = o->manager;
|
||||
spa_list_remove(&o->this.link);
|
||||
m->this.n_objects--;
|
||||
if (o->this.proxy)
|
||||
if (o->this.proxy) {
|
||||
if (o->info->events)
|
||||
spa_hook_remove(&o->object_listener);
|
||||
spa_hook_remove(&o->proxy_listener);
|
||||
pw_proxy_destroy(o->this.proxy);
|
||||
}
|
||||
free(o->this.type);
|
||||
if (o->this.props)
|
||||
pw_properties_free(o->this.props);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue