empathy r2191 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2191 - trunk/libempathy
- Date: Fri, 9 Jan 2009 16:15:37 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 9 16:15:37 2009
New Revision: 2191
URL: http://svn.gnome.org/viewvc/empathy?rev=2191&view=rev
Log:
Free ready callbacks in finalize
Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>
Modified:
trunk/libempathy/empathy-contact.c
Modified: trunk/libempathy/empathy-contact.c
==============================================================================
--- trunk/libempathy/empathy-contact.c (original)
+++ trunk/libempathy/empathy-contact.c Fri Jan 9 16:15:37 2009
@@ -219,6 +219,7 @@
contact_finalize (GObject *object)
{
EmpathyContactPriv *priv;
+ GList *l;
priv = GET_PRIV (object);
@@ -228,6 +229,18 @@
g_free (priv->id);
g_free (priv->presence_message);
+ for (l = priv->ready_callbacks; l != NULL; l = g_list_next (l))
+ {
+ ReadyCbData *d = (ReadyCbData *)l->data;
+
+ if (d->destroy != NULL)
+ d->destroy (d->user_data);
+ g_slice_free (ReadyCbData, d);
+ }
+
+ g_list_free (priv->ready_callbacks);
+ priv->ready_callbacks = NULL;
+
if (priv->avatar)
empathy_avatar_unref (priv->avatar);
@@ -372,8 +385,10 @@
if (d->destroy != NULL)
d->destroy (d->user_data);
- priv->ready_callbacks = g_list_delete_link (priv->ready_callbacks,
+ priv->ready_callbacks = g_list_delete_link (priv->ready_callbacks,
l);
+
+ g_slice_free (ReadyCbData, d);
}
}
}
@@ -415,6 +430,7 @@
contact_call_ready_callback (contact, NULL, d);
priv->ready_callbacks = g_list_delete_link
(priv->ready_callbacks, l);
+ g_slice_free (ReadyCbData, d);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]