[gst-devel] finalize in a plugin

Nie Jun niej0001 at gmail.com
Fri Nov 28 05:23:25 CET 2008


    A plugin is an instant of a gstclass, i.e. gstobject. The finalize
function is called when the plugin is destructed, not class is destructed.
If you want to free the pointers or other resources of your gstplug-in, you
can do it in state_change function. It you want to release resouces of an
object, not gstplug-in, you have to write the code in finalize function.

2008/11/28 Zoltan Seress <gatesofdarkness at gmail.com>

>
> Hi Dev,
>
> I know that this is not really a gstreamer specific question, rather
> GObject, so I read some GObject descriptions about finalize, but I would
> like to ask it nevertheless.
> How many times is the finalize function called during the life of a plugin?
> It is called only once at the destruction of the Class as the pair of the
> class_init? Is it a problem if I have some pointers as members of my
> element, but I don't overwrite the finalize function? Or is it called at the
> destruction of an element too?
> Thanks!
>
> Zoltan Seress
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081128/7be58ca9/attachment.htm>


More information about the gstreamer-devel mailing list