[PATCH] core: GrlMediaPlugin doesn't need finalize()



According to this commit:

commit 92de127e655d6c31dbc64c3e5a389b8bc6de12c8
Author: Iago Toral Quiroga <itoral igalia com>
Date:   Fri Sep 3 10:34:17 2010 +0200

core: Do not free plugin descriptors in GrlMediaPlugin's finalize function,
they are const members to be freed by the registry only when plugins are
unloaded, they should not be freed when a source spawned by the plugin is
 unloaded.

So there's nothing to do in the GrlMediaPlugin finalize(), then is better
remove it and have less lines of code to maintain.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez igalia com>
---
 src/grl-media-plugin.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/src/grl-media-plugin.c b/src/grl-media-plugin.c
index 30cad89..7f07591 100644
--- a/src/grl-media-plugin.c
+++ b/src/grl-media-plugin.c
@@ -52,8 +52,6 @@ struct _GrlMediaPluginPrivate {
   const GrlPluginInfo *info;
 };
 
-static void grl_media_plugin_finalize (GObject *object);
-
 /* ================ GrlMediaPlugin GObject ================ */
 
 G_DEFINE_ABSTRACT_TYPE (GrlMediaPlugin, grl_media_plugin, G_TYPE_OBJECT);
@@ -64,8 +62,6 @@ grl_media_plugin_class_init (GrlMediaPluginClass *media_plugin_class)
   GObjectClass *gobject_class;
   gobject_class = G_OBJECT_CLASS (media_plugin_class);
 
-  gobject_class->finalize = grl_media_plugin_finalize;
-
   g_type_class_add_private (media_plugin_class,
                             sizeof (GrlMediaPluginPrivate));
 }
@@ -76,17 +72,6 @@ grl_media_plugin_init (GrlMediaPlugin *plugin)
   plugin->priv = GRL_MEDIA_PLUGIN_GET_PRIVATE (plugin);
 }
 
-static void
-grl_media_plugin_finalize (GObject *object)
-{
-  GrlMediaPlugin *plugin = GRL_MEDIA_PLUGIN (object);
-
-  /* Do not free priv->info here, for that is a "const" member 
-     Plugin specs are freed by the registry when plugins are unloaded */
-
-  G_OBJECT_CLASS (grl_media_plugin_parent_class)->finalize (object);
-}
-
 /* ================ API ================ */
 
 void
-- 
1.7.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]