<br><br><div class="gmail_quote">On Thu, Oct 29, 2009 at 4:39 PM, Stefan Kost <span dir="ltr"><<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>></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">> Looking at the GstAppSink code i found that i actually have to override<br>
> the finalize function on the GObject class. Sorry to bother, I'm not<br>
> very used with Gobject :-).<br>
><br>
> The GstAppSink code (on the class init function):<br>
><br>
> GObjectClass *gobject_class = (GObjectClass *) klass;<br>
> GstBaseSinkClass *basesink_class = (GstBaseSinkClass *) klass;<br>
><br>
> gobject_class->dispose = gst_app_sink_dispose;<br>
> gobject_class->finalize = gst_app_sink_finalize;<br>
><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>
><br>
><br>
> On Thu, Oct 29, 2009 at 11:59 AM, Tiago Katcipis <<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a><br>
</div><div class="im">> <mailto:<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a>>> wrote:<br>
><br>
> I'm building an element that uses an external lib, and when my<br>
> element is freed (it ref count reaches zero), i want to free some<br>
> stuff of the external lib i use. I didn't find anything about a<br>
> generic destructor function that i can override, so when my element<br>
> is being freed i can free the resources that i was using on my<br>
> plugin. Can anyone help me?<br>
><br>
> best regards,<br>
> Katcipis<br>
><br>
><br>
><br>
><br>
><br>
><br>
</div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><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>
><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>
<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>"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..."<br>