[Workman-devel] [PATCH] WorkmanAttribute: remove dispose method

Josh Poimboeuf jpoimboe at redhat.com
Thu Mar 7 14:51:41 UTC 2013


Move the gvariant unref to finalize and get rid of the dispose method.
---
 workman/workman-attribute.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/workman/workman-attribute.c b/workman/workman-attribute.c
index 67faa6d..200f4e7 100644
--- a/workman/workman-attribute.c
+++ b/workman/workman-attribute.c
@@ -47,21 +47,12 @@ enum {
 
 
 static void
-workman_attribute_dispose(GObject *object)
-{
-    WorkmanAttribute *self = WORKMAN_ATTRIBUTE(object);
-
-    g_variant_unref(self->priv->value);
-
-    G_OBJECT_CLASS(workman_attribute_parent_class)->dispose(object);
-}
-
-static void
 workman_attribute_finalize(GObject *object)
 {
     WorkmanAttribute *attr = WORKMAN_ATTRIBUTE(object);
     WorkmanAttributePrivate *priv = attr->priv;
 
+    g_variant_unref(priv->value);
     g_free(priv->name);
 
     G_OBJECT_CLASS(workman_attribute_parent_class)->finalize(object);
@@ -135,7 +126,6 @@ workman_attribute_class_init(WorkmanAttributeClass *klass)
     GObjectClass *g_klass = G_OBJECT_CLASS(klass);
     GParamSpec *pspec;
 
-    g_klass->dispose = workman_attribute_dispose;
     g_klass->finalize = workman_attribute_finalize;
     g_klass->set_property = workman_attribute_set_property;
     g_klass->get_property = workman_attribute_get_property;
-- 
1.7.11.7




More information about the Workman-devel mailing list