Investigating memory leak

Pieter Hulshoff pieter at towel42.nl
Sun Feb 20 21:57:01 UTC 2022


Hello Michael,


On 20-02-2022 22:20, Michael Gruner via gstreamer-devel wrote:
> You may want to give the leaks tracer a try and see if there are any 
> orphan gobjects left behind:
>
> https://gstreamer.freedesktop.org/documentation/coretracers/leaks.html?gi-language=c 
> <https://gstreamer.freedesktop.org/documentation/coretracers/leaks.html?gi-language=c>

Ooh, that certainly looks helpful. I'll see if I can add that to my code 
to get a better perspective.


> Note that you’ll need to add gst_deinit() to your code and that the 
> tracer will only detect leaks by GStreamer objects not unreffed.

I'll keep that in mind. :)


> For a more generic leak check you may use Valgrind. Here’s a guide on 
> how to use Valgrind with GStreamer applications:
>
> https://developer.ridgerun.com/wiki/index.php?title=How_to_Analyze_GStreamer_with_Valgrind 
> <https://developer.ridgerun.com/wiki/index.php?title=How_to_Analyze_GStreamer_with_Valgrind>


I did extensive runs using Valgrind on the full RetroFE code already, 
but unfortunately it didn't provide me with the insight I was hoping 
for. I could run it on this test code; I haven't tried that yet. The 
test code is a lot smaller and less layered, so it should probably give 
me some help in that regard. Thanks for the reminder.


Kind regards,


Pieter Hulshoff




More information about the gstreamer-devel mailing list