<br><br><div class="gmail_quote">On Tue, May 18, 2010 at 10:13 PM, W. Michael Petullo <span dir="ltr">&lt;<a href="mailto:mike@flyn.org">mike@flyn.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

I am using gst_structure_get_name() to determine the mimetype of a<br>
stream (along with other things). In fact, I am doing this a few thousand<br>
times, each time setting up and tearing down a pipeline that makes use of<br>
decodebin. Because gst_structure_get_name() returns a constant string,<br>
I thought that it was wrong to free the returned string. However, I am<br>
finding that not free&#39;ing the returned string results in what appears<br>
to be a memory leak. Approximately 5-6MB of memory is consumed<br>
after processing 2,419 media files. Free&#39;ing the string returned by<br>
gst_structure_get_name() results in this memory not being consumed.<br></blockquote><div><br>Try,<br>
 valgrind --tool=memcheck --leak-check=full &lt;program&gt;<br>
<br>
This should give a detailed memory profile.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Can someone comment on the correct use of gst_structure_get_name()? Or<br>
do these symptoms indicate a problem elsewhere? I have attached my C<br>
source for reference.<br>
<font color="#888888"><br>
--<br>
Mike<br>
<br>
:wq<br>
</font><br>------------------------------------------------------------------------------<br>
<br>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>