GNOME Bugzilla – Bug 709879
GObject constructor arguments leak with GValue wrapping
Last modified: 2018-01-10 20:33:31 UTC
Running valgrind on test_gi reveals the following leaks: Test: tests/test_gi.py:TestPropertiesObject.test_variant: Code: GIMarshallingTests.PropertiesObject(some_variant=GLib.Variant('b', True)) Stack: 81 bytes, 1 blocks malloc g_malloc g_slice_alloc g_variant_alloc g_variant_new_from_bytes g_variant_new_from_trusted g_variant_new_boolean ffi_call_unix64 ffi_call g_callable_info_invoke g_function_info_invoke _invoke_callable Test: tests/test_gi.py:TestPropertiesObject.test_boxed_struct: Code: GIMarshallingTests.PropertiesObject(some_boxed_struct=struct1) Stack: 24 bytes, 1 blocks malloc g_malloc g_slice_alloc gi_marshalling_tests_boxed_struct_copy gi_marshalling_tests_properties_object_set_property object_set_property g_object_new_internal g_object_newv pygobject_constructv pygobject_init type_call PyObject_Call This could mean: 1. We need to clear GParameter.value out using g_value_unset after g_object_newv in gi/_gobject. 2. GIMarshallingTests needs to do it. I tried a bit more verification with Gtk.Scrollbar(adjustment=Gtk.Adjustment()) but it seemed to be tracking references correctly. This points a bit more towards GIMarshalingTests needing work in property setting code.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/55.