Question about bindings

Sebastian Dröge sebastian at
Mon Dec 12 10:46:39 UTC 2022

On Mon, 2022-12-12 at 07:49 +0330, Masoud MJ via gstreamer-devel wrote:
> I have a question about gstreamer bindings.
> Why there is no official binding available for Golang ?

Because nobody of the GStreamer team is maintaining Go bindings. There
are working and rather complete Go bindings at

Note however that these have the same problems by design as most other
bindings for languages with a tracing GC (e.g. C# and GJS but not
Python or Rust).
The GC can't know how "heavy" the C pointers are and only sees them as
a single pointer, while behind the pointer there could be lots of
references to other objects and huge memory allocations.

This has the effect that the GC considers all the C pointers as not
creating a lot of memory pressure and does not prioritize cleaning them
So you can end up with the C objects staying around for a long time and
using up a lot of memory.

The only alternatives to that is to introduce manual memory management
in the bindings and require the user to explicitly get rid of values
they don't use anymore, or to have an GC API that allows the GC to
properly trace the C pointers.

As such you need to be careful in your application.

Sebastian Dröge, Centricular Ltd ·
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list