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




commit a1f32eef2678a7277973734dad07278ae8c1b61b
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 a52e43167b..65cf02ca45 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1214,13 +1214,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]