[telepathy-gabble/master] Free GabbleCallContent's streams when disposing.

Mike Ruprecht mike.ruprecht at collabora.co.uk
Tue Jan 5 17:39:36 PST 2010


---
 src/call-content.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/call-content.c b/src/call-content.c
index 9217cdd..b225ef8 100644
--- a/src/call-content.c
+++ b/src/call-content.c
@@ -435,6 +435,7 @@ gabble_call_content_dispose (GObject *object)
 {
   GabbleCallContent *self = GABBLE_CALL_CONTENT (object);
   GabbleCallContentPrivate *priv = self->priv;
+  GList *l;
 
   if (priv->dispose_has_run)
     return;
@@ -442,6 +443,14 @@ gabble_call_content_dispose (GObject *object)
   priv->dispose_has_run = TRUE;
 
   /* release any references held by the object here */
+  for (l = priv->streams; l != NULL; l = g_list_next (l))
+    {
+      g_object_unref (l->data);
+    }
+
+  g_list_free (priv->streams);
+  priv->streams = NULL;
+
   g_object_unref (priv->content);
   priv->content = NULL;
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list