spa-device / m-monitor: fix pw_proxy leaks reported by pw_core

1. device export proxies must be destroyed manually since they are
   not associated with the WpRegistry
2. the monitors should not disconnect before all WpSpaDevice objects
   are destroyed; remove the manual disconnect call and let GObject
   ref counting do its job (the core will disconnect when its last ref
   count is dropped after the last monitor plugin is destroyed)
This commit is contained in:
George Kiagiadakis 2020-06-29 13:01:00 +03:00
parent b59ff48156
commit a3870581fb
2 changed files with 1 additions and 1 deletions

View file

@ -270,6 +270,7 @@ wp_spa_device_finalize (GObject * object)
{
WpSpaDevice *self = WP_SPA_DEVICE (object);
g_clear_pointer (&self->proxy, pw_proxy_destroy);
self->device = NULL;
g_clear_pointer (&self->handle, pw_unload_spa_handle);
g_clear_pointer (&self->properties, wp_properties_unref);

View file

@ -393,7 +393,6 @@ wp_monitor_deactivate (WpPlugin * plugin)
{
WpMonitor *self = WP_MONITOR (plugin);
wp_core_disconnect (self->local_core);
g_clear_object (&self->monitor);
}