[Galago-commits] r2636 - in trunk/libgalago: . libgalago

galago-commits at freedesktop.org galago-commits at freedesktop.org
Wed Mar 29 01:57:22 PST 2006


Author: chipx86
Date: 2006-03-29 01:57:15 -0800 (Wed, 29 Mar 2006)
New Revision: 2636

Modified:
   trunk/libgalago/ChangeLog
   trunk/libgalago/libgalago/galago-context.c
Log:
Fix an issue uncovered when binding libgalago. Objects being returned had their reference counts bumped up, which caused them to no longer be destroyed after galago was uninitted. The context was being destroyed and then unreffing each object, with the expectation of actually destroying them. Then Python (or whatever else) would later clean up and try to unref the objects. These objects would then attempt to remove themselves from the now garbage context. Now, we just run g_object_run_dispose() on these objects, killing them off for good.


Modified: trunk/libgalago/ChangeLog
===================================================================
--- trunk/libgalago/ChangeLog	2006-03-28 09:39:07 UTC (rev 2635)
+++ trunk/libgalago/ChangeLog	2006-03-29 09:57:15 UTC (rev 2636)
@@ -1,3 +1,16 @@
+Wed Mar 29 01:54:47 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* libgalago/galago-context.c:
+	  - Fix an issue uncovered when binding libgalago. Objects being returned
+	    had their reference counts bumped up, which caused them to no longer
+	    be destroyed after galago was uninitted. The context was being
+	    destroyed and then unreffing each object, with the expectation of
+	    actually destroying them. Then Python (or whatever else) would later
+	    clean up and try to unref the objects. These objects would then
+	    attempt to remove themselves from the now garbage context. Now, we
+	    just run g_object_run_dispose() on these objects, killing them off
+	    for good.
+
 Tue Mar 28 01:37:38 PST 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* libgalago/galago-context.c:

Modified: trunk/libgalago/libgalago/galago-context.c
===================================================================
--- trunk/libgalago/libgalago/galago-context.c	2006-03-28 09:39:07 UTC (rev 2635)
+++ trunk/libgalago/libgalago/galago-context.c	2006-03-29 09:57:15 UTC (rev 2636)
@@ -180,13 +180,13 @@
 	if (context->priv != NULL)
 	{
 		g_list_foreach(context->priv->local.services,
-					   (GFunc)g_object_unref, NULL);
+					   (GFunc)g_object_run_dispose, NULL);
 		g_list_foreach(context->priv->remote.services,
-					   (GFunc)g_object_unref, NULL);
+					   (GFunc)g_object_run_dispose, NULL);
 		g_list_foreach(context->priv->local.people,
-					   (GFunc)g_object_unref, NULL);
+					   (GFunc)g_object_run_dispose, NULL);
 		g_list_foreach(context->priv->remote.people,
-					   (GFunc)g_object_unref, NULL);
+					   (GFunc)g_object_run_dispose, NULL);
 
 		g_hash_table_destroy(context->priv->services_table);
 		g_hash_table_destroy(context->priv->people_table);
@@ -726,9 +726,9 @@
 	{
 		case GALAGO_LOCAL:
 			g_list_foreach(context->priv->local.services,
-						   (GFunc)g_object_unref, NULL);
+						   (GFunc)g_object_run_dispose, NULL);
 			g_list_foreach(context->priv->local.people,
-						   (GFunc)g_object_unref, NULL);
+						   (GFunc)g_object_run_dispose, NULL);
 
 			context->priv->local.services = NULL;
 			context->priv->local.people   = NULL;
@@ -736,9 +736,9 @@
 
 		case GALAGO_REMOTE:
 			g_list_foreach(context->priv->remote.services,
-						   (GFunc)g_object_unref, NULL);
+						   (GFunc)g_object_run_dispose, NULL);
 			g_list_foreach(context->priv->remote.people,
-						   (GFunc)g_object_unref, NULL);
+						   (GFunc)g_object_run_dispose, NULL);
 
 			context->priv->remote.services = NULL;
 			context->priv->remote.people   = NULL;



More information about the galago-commits mailing list