GNOME Bugzilla – Bug 686812
memory leaks
Last modified: 2017-05-22 16:55:51 UTC
see patches
Created attachment 227166 [details] [review] prettytable: fix leak in get_icon_from_gio()
Created attachment 227167 [details] [review] util: fix leak in format_network()
Created attachment 227168 [details] [review] sysinfo: fix leak in get_os_type()
Created attachment 227169 [details] [review] procman-app: fix leak in color_changed_cb()
Created attachment 227170 [details] [review] procman-app: fix leak in get_tree_state()
Created attachment 227171 [details] [review] procman-app: fix leaks in apply_cpu_color_settings()
Thanks for the proposed patches, these do fix some memory leaks, thanks for spotting them. How did you find them? Just by reading the code or with some special memory analysis tool? I will commit these to both the stable and the development versions.
(In reply to comment #7) > How did you find them? Just by reading the code or with some > special memory analysis tool? With valgrind, see https://live.gnome.org/Valgrind
Thanks for the info, I did experiment with it (paired with KCacheGrind), but I was merely checking for performance bottlenecks (CPU time) rather then memory leaks.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
The "util: fix leak in format_network()" part did not get committed — was that intentional? Also, will you backport this to stable?
My wrong, it *was* committed, sorry. I'll now backport it to Ubuntu.
Quoting from https://bugs.launchpad.net/ubuntu/+source/gnome-system-monitor/+bug/1110498/comments/6: Unfortunately it's not fixed. I've left it running for the night and this morning it was using more than 1GB of RAM: http://i.imgur.com/vRng63A.png I'm using the latest version 3.7.90-0ubuntu1 Also, I've noticed the GNOME System Monitor memory usage increasing rapidly when upgrading a lot of packages using Synaptic Package Manager, maybe someone could check that out...? I'll try to reproduce it when I have lots of updates...
Reopening, as we still have some leaks.
Created attachment 237231 [details] [review] procman-app: plug small leaks
Review of attachment 237231 [details] [review]: Thanks again, committed.
Ok, this is a really generic ticket, we have handled several memory leaks, but let's handle the rest individually, as I don't think keeping this metabug open forever makes sense. This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.