[Telepathy-commits] [telepathy-salut/master] SalutTubesChannel's dispose: unref, disconnect signals and remove stanza filters
Alban Crequy
alban.crequy at collabora.co.uk
Tue Nov 25 03:59:09 PST 2008
20080424114711-a41c0-d1721b40ccc4cb962345587d2620aec91c87a8ba.gz
---
src/salut-tubes-channel.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c
index 5b17752..f29773c 100644
--- a/src/salut-tubes-channel.c
+++ b/src/salut-tubes-channel.c
@@ -2251,6 +2251,37 @@ salut_tubes_channel_dispose (GObject *object)
priv->muc_connection = NULL;
}
+ if (priv->iq_helper != NULL)
+ {
+ g_object_unref (priv->iq_helper);
+ priv->iq_helper = NULL;
+ }
+
+ if (priv->xmpp_connection != NULL)
+ {
+ salut_xmpp_connection_manager_remove_stanza_filter (
+ priv->xmpp_connection_manager, priv->xmpp_connection,
+ message_stanza_filter, message_stanza_callback, self);
+
+ g_object_unref (priv->xmpp_connection);
+ priv->xmpp_connection = NULL;
+ }
+
+ if (priv->xmpp_connection_manager != NULL)
+ {
+ g_signal_handlers_disconnect_matched (priv->xmpp_connection_manager,
+ G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self);
+
+ g_object_unref (priv->xmpp_connection_manager);
+ priv->xmpp_connection_manager = NULL;
+ }
+
+ if (priv->contact != NULL)
+ {
+ g_object_unref (priv->contact);
+ priv->contact = NULL;
+ }
+
priv->dispose_has_run = TRUE;
tp_handle_unref (handle_repo, priv->handle);
--
1.5.6.5
More information about the Telepathy-commits
mailing list