diff options
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-object.c | 8 |
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 |