Remove bus watch when tearing down pipeline

Sebastian Dröge sebastian at centricular.com
Wed Sep 2 09:04:52 UTC 2020


On Wed, 2020-09-02 at 10:09 +0200, Guillermo Rodriguez Garcia wrote:
> 
> When I tear down the pipeline (by setting its state to NULL, and then
> calling gst_object_unref(pipeline), do I need to explicitly remove
> the bus watch to prevent resource leaks?
> 
> I understood that this was not necessary and that the bus watch
> should be destroyed automatically, together with the bus.

If you don't explicitly destroy it then it will still be attached to
the GMainContext until that is freed (which will never happen if you
use the global default one).

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com




More information about the gstreamer-devel mailing list