Segfault dropping `Stream` if `Context` is already dropped
pw_stream_destroy
segfaults if the Context
was already dropped. After some other memory errors like in the call to libspa::hook::remove
destroying the StreamListener
. Valgrind reports no memory errors if the Context
is dropped last.
I guess Context
needs to be ref-counted, and CoreInner
needs to contain a reference to it? Stream
already has a reference to Core
, but I'm not sure that's doing anything since CoreInner
just contains a pointer and doesn't seem to implement Drop
. Looks like a call to pw_core_destroy
is missing.