How to properly release the memory used by a pipeline?

Tim Müller tim at centricular.com
Sat Sep 23 08:17:38 UTC 2017


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/


More information about the gstreamer-devel mailing list