Remove the extra proxy to the node, it's awkward and not needed.
pw_core_export() returns a handle to the remote object with the
interface of the factory.
If the node is destroyed, make sure the proxy doesn't access
it anymore.
If the handle is removed or destroyed, make sure we remove the
proxy related info around the node. Never destroy the proxy
ourselves, this is something the app needs to do when it is
ready.
due to usage of VK_ERROR_OUT_OF_POOL_MEMORY, VK_ERROR_INVALID_EXTERNAL_HANDLE,
VK_API_VERSION_1_1 and VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT
introduced in version 1.1.69
Signed-off-by: Martin Koch <martin.koch@ese.de>
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.
Don't set the core to NULL in _remove so that the proxies
will be removed from the map when they are destroyed. Then make
another run over the map to warn about the proxies that were not
destroyed.
When the core is disconnected, first do _remove on all active
proxies and then run the _destroy handles. This makes it easier
to clean up dependent resources.
Remove the modules after removing all objects. It's harder for
odules to track and remove all objects.
When the proxy is destroyed, suspend the node before we start
removing the memory or else the node might still be using it from
the data thread and crash.