After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735013 - Memory leaks in GI regress and marshalling tests property setters
Memory leaks in GI regress and marshalling tests property setters
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 693111
 
 
Reported: 2014-08-18 20:35 UTC by Simon Feltman
Modified: 2018-02-08 12:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Fix memory leaks in regress and marshalling tests property setters (3.65 KB, patch)
2014-08-18 20:38 UTC, Simon Feltman
none Details | Review
regress: Use g_list_free_full and g_list_copy_deep (1.34 KB, patch)
2016-12-23 23:25 UTC, Simon Feltman
none Details | Review
regress: Don't leak in property setter and destructor (1.40 KB, patch)
2016-12-23 23:25 UTC, Simon Feltman
none Details | Review
gimarshallingtests: Don't leak properties in destruction (1.36 KB, patch)
2016-12-23 23:26 UTC, Simon Feltman
none Details | Review

Description Simon Feltman 2014-08-18 20:35:45 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.
Comment 1 Simon Feltman 2014-08-18 20:38:40 UTC
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.
Comment 2 André Klapper 2015-02-07 17:16:13 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 3 Simon Feltman 2016-12-23 23:25:05 UTC
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.
Comment 4 Simon Feltman 2016-12-23 23:25:52 UTC
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.
Comment 5 Simon Feltman 2016-12-23 23:26:20 UTC
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.
Comment 6 GNOME Infrastructure Team 2018-02-08 12:29:08 UTC
-- 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.