Wrap setting freed instance memory to 0xaa in #ifdef G_ENABLE_DEBUG
authorOwen Taylor <otaylor@redhat.com>
Mon, 25 Mar 2002 22:26:53 +0000 (22:26 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 25 Mar 2002 22:26:53 +0000 (22:26 +0000)
Mon Mar 25 17:25:57 2002  Owen Taylor  <otaylor@redhat.com>

        * gtype.c (g_type_free_instance): Wrap setting freed instance
        memory to 0xaa in #ifdef G_ENABLE_DEBUG

gobject/ChangeLog
gobject/gtype.c

index 242b89c6e0e61a42ce50a70744f8ecbd1a6e6eb7..0c0044ec6db0f7b4b9a4ad4db264d995b0125cd5 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar 25 17:25:57 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtype.c (g_type_free_instance): Wrap setting freed instance
+       memory to 0xaa in #ifdef G_ENABLE_DEBUG
+
 Thu Mar 21 01:28:14 2002  Tim Janik  <timj@gtk.org>
 
        * gsignal.[hc]:
index 9bb0b91f9fa2d011fa8cbafeb4d61d082b517360..f419af8ab19a303b38e920bc07ea30933408d809 100644 (file)
@@ -1377,7 +1377,9 @@ g_type_free_instance (GTypeInstance *instance)
     }
   
   instance->g_class = NULL;
-  memset (instance, 0xaa, node->data->instance.instance_size); /* FIXME: debugging hack */
+#ifdef G_ENABLE_DEBUG  
+  memset (instance, 0xaa, node->data->instance.instance_size); /* debugging hack */
+#endif  
   if (node->data->instance.n_preallocs)
     {
       G_WRITE_LOCK (&type_rw_lock);