handle cleanup of remote proxies

Destroying a resource informs the client to destroy the proxy.
Destroying an object destroys all the bound resources on it.
This commit is contained in:
Wim Taymans 2016-12-02 17:14:32 +01:00
parent e6f45a7686
commit 5e8a3afe17
8 changed files with 38 additions and 4 deletions

View file

@ -121,7 +121,6 @@ core_dispatch_func (void *object,
proxy = pinos_map_lookup (&this->objects, m->id);
if (proxy) {
pinos_log_debug ("context %p: object remove %u", this, m->id);
pinos_map_remove (&this->objects, m->id);
pinos_proxy_destroy (proxy);
}
break;

View file

@ -113,7 +113,7 @@ pinos_map_for_each (PinosMap *map,
PinosMapItem *item;
pinos_array_for_each (item, &map->items) {
if (!pinos_map_item_is_free (item))
if (item->data && !pinos_map_item_is_free (item))
func (item->data, data);
}
}