[glib/finalize-speedups: 4/5] gobject: Speed up finalization




commit 2107e1123b6886d1db2f2926121a0cd01a8e9a92
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 22 08:04:51 2022 -0400

    gobject: Speed up finalization
    
    Move the warning about finalize-during-construction
    to debug-only.

 gobject/gobject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index f9a091ce16..f82e1d57ea 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1215,13 +1215,13 @@ floating_check (GObject *object)
 static void
 g_object_finalize (GObject *object)
 {
+#ifdef G_ENABLE_DEBUG
   if (object_in_construction (object))
     {
       g_critical ("object %s %p finalized while still in-construction",
                   G_OBJECT_TYPE_NAME (object), object);
     }
 
-#ifdef G_ENABLE_DEBUG
  if (floating_check (object))
    {
       g_critical ("A floating object %s %p was finalized. This means that someone\n"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]