How to properly release the memory used by a pipeline?

Yuniesky Vasconcelo yvasconcelo at gmail.com
Sat Sep 23 17:08:08 UTC 2017


Thank you Tim.
I measure memory growth with htop, so I use the sleep function to give me
time to see what happened to memory.

2017-09-23 4:17 GMT-04:00 Tim Müller <tim at centricular.com>:

> On Fri, 2017-09-22 at 20:22 -0400, Yuniesky Vasconcelo wrote:
>
> Hi,
>
> Your code looks fine at first glance. Setting pipeline to NULL state
> and unrefing it should be all that's needed. You don't use the bus, so
> you're not leaking bus messages either.
>
> How do you measure "memory grows every time"?
>
> You can use
>
>   G_SLICE=always-malloc valgrind --leak-check=yes --show-reachable=no
> gst-launch-1.0 ...
>
> (might want to use some .supp suppression files which you can find in
> the gstreamer git repos).
>
> Cheers
>  -Tim
>
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com
>
> Join us at the GStreamer Conference!
> 21-22 October 2017 in Prague, Czech Republic
> http://gstreamer.freedesktop.org/conference/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170923/aa0c7dec/attachment.html>


More information about the gstreamer-devel mailing list