[libgda: 5/6] GdaMetaStruct: Removed finalize method
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda: 5/6] GdaMetaStruct: Removed finalize method
- Date: Tue, 20 Aug 2019 13:21:43 +0000 (UTC)
commit 42ff34ca30ee615661a18f96ee62301eaa1da8cb
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Mon Aug 19 22:09:47 2019 -0500
GdaMetaStruct: Removed finalize method
priv->parser will be freed in the dispose method.
libgda/gda-meta-struct.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
---
diff --git a/libgda/gda-meta-struct.c b/libgda/gda-meta-struct.c
index efed876e3..1ca5ce571 100644
--- a/libgda/gda-meta-struct.c
+++ b/libgda/gda-meta-struct.c
@@ -36,7 +36,6 @@
* Main static functions
*/
static void gda_meta_struct_dispose (GObject *object);
-static void gda_meta_struct_finalize (GObject *object);
static void gda_meta_struct_set_property (GObject *object,
guint param_id,
@@ -117,7 +116,6 @@ gda_meta_struct_class_init (GdaMetaStructClass *klass) {
/* virtual methods */
object_class->dispose = gda_meta_struct_dispose;
- object_class->finalize = gda_meta_struct_finalize;
}
@@ -160,24 +158,11 @@ gda_meta_struct_dispose (GObject *object)
priv->index = NULL;
}
- /* parent class */
- G_OBJECT_CLASS (gda_meta_struct_parent_class)->dispose (object);
-}
-
-static void
-gda_meta_struct_finalize (GObject *object)
-{
- g_assert_nonnull (object);
- g_assert_true (GDA_IS_META_STRUCT (object));
-
- GdaMetaStruct *mstruct;
- mstruct = GDA_META_STRUCT (object);
- GdaMetaStructPrivate *priv = gda_meta_struct_get_instance_private (mstruct);
-
- g_object_unref (priv->parser);
+ if (priv->parser)
+ g_clear_object (&priv->parser);
/* parent class */
- G_OBJECT_CLASS (gda_meta_struct_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gda_meta_struct_parent_class)->dispose (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]