media-session: improve cleanup of objects

Don't try to use the proxy destroy event to destroy the objects.
It is not called automatically anymore, only when we call
pw_proxy_destroy() ourselves.

Destroy the proxy objects when we destroy the session managed
object instead, either when the global is removed or when we
explicitly call _destroy()

Add an object free signal to clean up final resources after the
proxies have been destroyed, like closing libraries.

Track and destroy our link proxies.
This commit is contained in:
Wim Taymans 2020-06-04 17:41:01 +02:00
parent 47ae56df7d
commit ed31ca30cd
4 changed files with 104 additions and 80 deletions

View file

@ -43,6 +43,7 @@ struct sm_object_events {
void (*update) (void *data);
void (*destroy) (void *data);
void (*free) (void *data);
};
struct sm_object_methods {