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 789227 - MetaLogicalMonitor: free the monitors list on finalize
MetaLogicalMonitor: free the monitors list on finalize
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-10-20 04:55 UTC by Marco Trevisan (Treviño)
Modified: 2017-10-20 08:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MetaLogicalMonitor: free the monitors list on finalize (1.11 KB, patch)
2017-10-20 04:55 UTC, Marco Trevisan (Treviño)
none Details | Review
MetaLogicalMonitor: free the monitors list on finalize (1.16 KB, patch)
2017-10-20 07:01 UTC, Marco Trevisan (Treviño)
committed Details | Review

Description Marco Trevisan (Treviño) 2017-10-20 04:55:10 UTC
We leak a list on MetaLogicalMonitor, just clean this up on finalize.
Comment 1 Marco Trevisan (Treviño) 2017-10-20 04:55:13 UTC
Created attachment 361911 [details] [review]
MetaLogicalMonitor: free the monitors list on finalize
Comment 2 Marco Trevisan (Treviño) 2017-10-20 04:56:36 UTC
Not sure if this has some relation with https://bugzilla.redhat.com/show_bug.cgi?id=1472724 but I'm skeptical.

I think adding proper refs/weak refs would be better for that instead.
Comment 3 Jonas Ådahl 2017-10-20 05:55:10 UTC
Review of attachment 361911 [details] [review]:

Good catch! Except for two naming nits this looks good to me.

::: src/backends/meta-logical-monitor.c
@@ +254,3 @@
 
+static void
+meta_logical_monitor_finalize (GObject *gobject)

consistency nit: s/gobject/object/

@@ +266,3 @@
 meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass)
 {
+  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

consistency nit: s/gobject_class/object_class/
Comment 4 Jonas Ådahl 2017-10-20 05:56:07 UTC
For the record, https://bugzilla.redhat.com/show_bug.cgi?id=1472724 is handled in https://bugzilla.gnome.org/show_bug.cgi?id=786929 .
Comment 5 Marco Trevisan (Treviño) 2017-10-20 07:01:05 UTC
Created attachment 361916 [details] [review]
MetaLogicalMonitor: free the monitors list on finalize

Updated patch as requested
Comment 6 Jonas Ådahl 2017-10-20 07:13:52 UTC
Review of attachment 361916 [details] [review]:

lgtm.
Comment 7 Marco Trevisan (Treviño) 2017-10-20 08:12:32 UTC
The following fixes have been pushed:
Comment 8 Marco Trevisan (Treviño) 2017-10-20 08:27:23 UTC
Fixed here https://git.gnome.org/browse/mutter/commit/?id=f8cf6d0