[libgdata] [core] Cleaned up a few TODO comments



commit f7596a72609017537d8ef3cd677369b8db28cd4a
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun May 10 22:27:41 2009 +0100

    [core] Cleaned up a few TODO comments
---
 gdata/gdata-entry.c |    2 --
 gdata/gdata-feed.c  |   20 ++++++++++++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/gdata/gdata-entry.c b/gdata/gdata-entry.c
index 2a16c64..53947cc 100644
--- a/gdata/gdata-entry.c
+++ b/gdata/gdata-entry.c
@@ -341,7 +341,6 @@ gdata_entry_new (const gchar *id)
 GDataEntry *
 _gdata_entry_new_from_xml (GType entry_type, const gchar *xml, gint length, GError **error)
 {
-	/* TODO: Shouldn't this be private? */
 	xmlDoc *doc;
 	xmlNode *node;
 
@@ -529,7 +528,6 @@ real_parse_xml (GDataEntry *self, xmlDoc *doc, xmlNode *node, GError **error)
 		xmlFree (length);
 	} else if (xmlStrcmp (node->name, (xmlChar*) "author") == 0) {
 		/* atom:author */
-		/* TODO: move this and similar functions (link, category) to gdata-atom.c */
 		GDataAuthor *author;
 		xmlNode *author_node;
 		xmlChar *name = NULL, *uri = NULL, *email = NULL;
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index 6ad948e..2c6a66e 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -44,6 +44,7 @@
 #include "gdata-service.h"
 #include "gdata-parser.h"
 
+static void gdata_feed_dispose (GObject *object);
 static void gdata_feed_finalize (GObject *object);
 static void gdata_feed_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
 static void gdata_feed_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
@@ -91,6 +92,7 @@ gdata_feed_class_init (GDataFeedClass *klass)
 
 	gobject_class->set_property = gdata_feed_set_property;
 	gobject_class->get_property = gdata_feed_get_property;
+	gobject_class->dispose = gdata_feed_dispose;
 	gobject_class->finalize = gdata_feed_finalize;
 
 	/**
@@ -244,12 +246,26 @@ gdata_feed_init (GDataFeed *self)
 }
 
 static void
+gdata_feed_dispose (GObject *object)
+{
+	GDataFeedPrivate *priv = GDATA_FEED_GET_PRIVATE (object);
+
+	if (priv->entries != NULL) {
+		g_list_foreach (priv->entries, (GFunc) g_object_unref, NULL);
+		g_list_free (priv->entries);
+	}
+	priv->entries = NULL;
+
+
+	/* Chain up to the parent class */
+	G_OBJECT_CLASS (gdata_feed_parent_class)->dispose (object);
+}
+
+static void
 gdata_feed_finalize (GObject *object)
 {
 	GDataFeedPrivate *priv = GDATA_FEED_GET_PRIVATE (object);
 
-	g_list_foreach (priv->entries, (GFunc) g_object_unref, NULL); /* TODO: move to dispose */
-	g_list_free (priv->entries);
 	g_free (priv->title);
 	g_free (priv->subtitle);
 	g_free (priv->id);



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