aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-object.c
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 /camel/camel-object.c
parentcfdc0e2cff1fee63467f8a3ad9534a97b2c267b1 (diff)
downloadgsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.tar
gsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.tar.gz
gsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.tar.bz2
gsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.tar.lz
gsoc2013-evolution-eda4386f98cb8169e122c2137d6c4eb6be6f5e8b.tar.xz
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
Diffstat (limited to 'camel/camel-object.c')
-rw-r--r--camel/camel-object.c8
1 files changed, 8 insertions, 0 deletions
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