aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-07-06 21:00:48 +0800
committerPeter Williams <peterw@src.gnome.org>2001-07-06 21:00:48 +0800
commiteda4386f98cb8169e122c2137d6c4eb6be6f5e8b (patch)
tree849e89d49fe8b59d93c756c1ecc10b5203995664
parentcfdc0e2cff1fee63467f8a3ad9534a97b2c267b1 (diff)
downloadgsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.tar.gz
gsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.tar.zst
gsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.zip
Make sure that after the finalization event has happened and the
2001-07-06 Peter Williams <peterw@ximian.com> * camel-object.c (camel_object_unref): Make sure that after the finalization event has happened and the finalization functions have been called that the object still has a zero refcount. svn path=/trunk/; revision=10844
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-object.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 658c96c3e0..81fd8868fa 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-06 Peter Williams <peterw@ximian.com>
+
+ * camel-object.c (camel_object_unref): Make sure that after the
+ finalization event has happened and the finalization functions
+ have been called that the object still has a zero refcount.
+
2001-07-06 Joe Shaw <joe@ximian.com>
* providers/nntp/camel-nntp-grouplist.c: Add locking to
diff --git a/camel/camel-object.c b/camel/camel-object.c
index daa83284c0..7d6f38a55b 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -545,6 +545,14 @@ camel_object_unref (CamelObject * obj)
g_slist_free (head);
+ /* Sanity check */
+
+ if (obj->ref_count != 0)
+ g_warning ("camel_object_unref: destroyed object %s at %p somehow got"
+ " referenced in destruction chain.",
+ camel_type_to_name (obj->s.type),
+ obj);
+
/* A little bit of cleaning up.
* Don't erase the type, so we can peek at it if a finalized object