/soc/2013/ankitkv/gobjectification: a4e0f46652d5: Set IM and Cha...

Ankit Vani a at nevitus.org
Sat Jul 6 15:41:01 EDT 2013


Changeset: a4e0f46652d5b2d591a71921e40ca3667a0e61c5
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-07 01:10 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/a4e0f46652d5

Description:

Set IM and Chat data to NULL on finalize as PurpleConversation will pass conversation to UiOps in the end

diffstat:

 libpurple/conversationtypes.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (36 lines):

diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -483,6 +483,7 @@ purple_im_conversation_finalize(GObject 
 	PurpleIMConversationPrivate *priv = PURPLE_IM_CONVERSATION_GET_PRIVATE(im);
 
 	purple_buddy_icon_unref(priv->icon);
+	priv->icon = NULL;
 
 	G_OBJECT_CLASS(parent_class)->finalize(object);
 }
@@ -1490,17 +1491,24 @@ purple_chat_conversation_finalize(GObjec
 	PurpleChatConversationPrivate *priv = PURPLE_CHAT_CONVERSATION_GET_PRIVATE(chat);
 
 	g_hash_table_destroy(priv->users);
+	priv->users = NULL;
 
 	g_list_foreach(priv->in_room, (GFunc)g_object_unref, NULL);
 	g_list_free(priv->in_room);
+	priv->in_room = NULL;
 
 	g_list_foreach(priv->ignored, (GFunc)g_free, NULL);
 	g_list_free(priv->ignored);
+	priv->ignored = NULL;
 
 	g_free(priv->who);
 	g_free(priv->topic);
 	g_free(priv->nick);
 
+	priv->who = NULL;
+	priv->topic = NULL;
+	priv->nick = NULL;
+
 	G_OBJECT_CLASS(parent_class)->finalize(object);
 }
 



More information about the Commits mailing list