<html><head></head><body><div>On Mon, 2022-12-12 at 07:49 +0330, Masoud MJ via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="auto"><div dir="auto">I have a question about gstreamer bindings.</div><div dir="auto">Why there is no official binding available for Golang ?</div></div></blockquote><div><br></div><div>Because nobody of the GStreamer team is maintaining Go bindings. There are working and rather complete Go bindings at</div><div> <a href="https://github.com/tinyzimmer/go-gst">https://github.com/tinyzimmer/go-gst</a></div><div><br></div><div>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).</div><div>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.</div><div><br></div><div>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 up.</div><div>So you can end up with the C objects staying around for a long time and using up a lot of memory.</div><div><br></div><div>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.</div><div><br></div><div>As such you need to be careful in your application.</div><div><br></div><div><span><pre>-- <br></pre><div><div><span style="font-family: Calibri, sans-serif; font-size: 14.666667px;">Sebastian Dröge, Centricular Ltd · </span><a href="https://www.centricular.com/" title="Click to open https://www.centricular.com/" style="color: rgb(0, 0, 238); font-family: Calibri, sans-serif; font-size: 14.666667px;">https://www.centricular.com</a></div></div></span></div></body></html>