<br><br><div class="gmail_quote">On Thu, Oct 29, 2009 at 4:39 PM, Stefan Kost <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Tiago Katcipis schrieb:<br>
<div class="im">&gt; Looking at the GstAppSink code i found that i actually have to override<br>
&gt; the finalize function on the GObject class. Sorry to bother, I&#39;m not<br>
&gt; very used with Gobject :-).<br>
&gt;<br>
&gt; The GstAppSink code (on the class init function):<br>
&gt;<br>
&gt; GObjectClass *gobject_class = (GObjectClass *) klass;<br>
&gt;   GstBaseSinkClass *basesink_class = (GstBaseSinkClass *) klass;<br>
&gt;<br>
&gt;   gobject_class-&gt;dispose = gst_app_sink_dispose;<br>
&gt;   gobject_class-&gt;finalize = gst_app_sink_finalize;<br>
&gt;<br>
<br>
</div>just for your info, dispose can theortically be called multiple times and<br>
finalize is called just once. The idea is to call unref in dispose, set object s<br>
to NULL and check that incase its called again. Do free()s in finalize<br>
<font color="#888888"><br>
Stefan<br></font></blockquote><div><br>Thanks for the help Stefan, sorry to bother you guys with such an simple question.<br><br>Best regards,<br>Katcipis<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888">
</font><div class="im"><br>
&gt;<br>
&gt;<br>
&gt; On Thu, Oct 29, 2009 at 11:59 AM, Tiago Katcipis &lt;<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     I&#39;m building an element that uses an external lib, and when my<br>
&gt;     element is freed (it ref count reaches zero), i want to free some<br>
&gt;     stuff of the external lib i use. I didn&#39;t find anything about a<br>
&gt;     generic destructor function that i can override, so when my element<br>
&gt;     is being freed i can free the resources that i was using on my<br>
&gt;     plugin. Can anyone help me?<br>
&gt;<br>
&gt;     best regards,<br>
&gt;     Katcipis<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div>&gt; ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">&gt;<br>
&gt; ------------------------------------------------------------------------------<br>
&gt; Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
&gt; is the only developer event you need to attend this year. Jumpstart your<br>
&gt; developing skills, take BlackBerry mobile applications to market and stay<br>
&gt; ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
&gt; <a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a><br>
&gt;<br>
&gt;<br>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gstreamer-devel mailing list<br>
&gt; <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br>
<br>
------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
<a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a><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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>&quot;Se você se perder na selva africana, não precisa se desesperar. Basta sentar em uma pedra e começar a instalar GNU/Linux em seu laptop. Em menos de 5 minutos aparecerá alguém pra discordar de sua escolha de distribuição, do particionamento, do gerenciador de janelas, do ambiente de desktop, do editor de textos...&quot;<br>