GNOME Bugzilla – Bug 735013
Memory leaks in GI regress and marshalling tests property setters
Last modified: 2018-02-08 12:29:08 UTC
There are a handful of leaks due to properties not being free'd prior to setting new values or not being cleanup up in destruction. Patch will follow.
Created attachment 283822 [details] [review] tests: Fix memory leaks in regress and marshalling tests property setters Make sure to free memory stored in fields before setting them to new values. Cleanup hash_table, list, and string in regress->dispose(). Add marshalling tests PropertiesObject dispose which frees up boxed, glist, varian, and object fields.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Created attachment 342435 [details] [review] regress: Use g_list_free_full and g_list_copy_deep Cleanup which replaces manual loop implementation with API calls when setting the linked list property.
Created attachment 342436 [details] [review] regress: Don't leak in property setter and destructor Clear the string property of RegressTestObj prior to setting within the property setter. Make sure the linked list, hash table, and string properties are cleared during destruction. This fixes trivial memory leaks found with the PyGObject test suite.
Created attachment 342437 [details] [review] gimarshallingtests: Don't leak properties in destruction Clear strv, boxed_struct, variant, boxed_glist, and object properties during destruction. This fixes trivial memory leaks found in the PyGObject tests suite.
-- 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/gobject-introspection/issues/113.