[gimp] Issue #3912 - Object proxy management not happy with bindings



commit 73cd120a4c754b071b4c8d81fe0478e608b9f3f4
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 12 12:17:35 2019 +0200

    Issue #3912 - Object proxy management not happy with bindings
    
    Don't drop references we do not own. Turns out bindings can have
    things referenced even after all procedure code has returned. Keep the
    old code there in #if 0 and keep the debug warning for now, maybe we
    can do something generic about this.

 libgimp/gimpplugin.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/libgimp/gimpplugin.c b/libgimp/gimpplugin.c
index 519c8a9f55..d1cca6595b 100644
--- a/libgimp/gimpplugin.c
+++ b/libgimp/gimpplugin.c
@@ -1465,9 +1465,17 @@ gimp_plug_in_destroy_proxies (GHashTable *hash_table,
                       "by plug-in, it MUST NOT do that!\n",
                       G_STRFUNC, G_OBJECT_TYPE_NAME (object), id);
 
+#if 0
+          /* the code used to do this, but it appears that some bindings
+           * keep references around until later, let's keep this for
+           * reference and as a reminder to figure if we can do anything
+           * generic about it that works for all bindings.
+           */
           while (object->ref_count > 1)
             g_object_unref (object);
-
+#else
+          g_object_unref (object);
+#endif
           g_hash_table_iter_remove (&iter);
         }
     }


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