This is related to https://bugzilla.xfce.org/show_bug.cgi?id=11538 (marked as resolved). I'm still seeing a slow leaking of RES memory from the power manager plugin. The following command shows the slow RES leakage: top -p $(ps -ef | grep libxfce4power | grep -v grep | awk '{ print $2 }') OS & version: ArchLinux (1.5.2git-4ed7c49) & Xubuntu 15.10 (1.4.4) Also seen by one other person: https://forum.xfce.org/viewtopic.php?pid=39629 Restarting the panel re-sets the memory usage. Will try to troubleshoot with valgrind when I have time.
I'm also seeing the leak having upgraded to xubuntu 15.10. The top command suggested doesn't work for me because grep libxfce4power | grep -v grep returns nothing. I used http://stackoverflow.com/a/12254656/150884 to find out that xfce4-power-manager has leaked ~2GB of swap. As the forum post suggests, restarting the process is a workaround. Is it worth filing an xubuntu bug, too?
I have the same problems with xubuntu 15.10. memory leak increase little by little and become huge
Created attachment 6564 memory leaks This patch should fix a couple memory leaks I found. It still looks like we might be leaking something when the icon actually changes (i.e. going from full power to on battery) but I stop seeing a leak when it's idle at full charge. Would be nice if someone could verify it helps and that it doesn't cause any crashes/regressions.
Thanks for the patch, Eric. I've been running it for the last 5 hours and it seems to mostly fix the issue. I still get a small bump when I hover the mouse over the indicator, but it seems to no longer leak memory like it did. I don't see the memory leaking when the icon changes on battery status. I checked some of the other functionality and everything seems ok (other than the crashing when adjusting brightness which I've had for a while now - https://bugzilla.xfce.org/show_bug.cgi?id=12291 - which isn't related to this patch).
Found one issue. The System Tray Icon no longer works when activated in the Power Manager Settings. It doesn't show up in the panel like it used to.
Created attachment 6571 memory leaks Good catch, this revision should fix that issue.
Eric, The patch does bring the icon back. However, regardless of the icon theme, the systray icon is always black in colour now. I have tried different icon themes, I disabled and re-enabled the systray icon after changing themes and restarted the panel. Here are some screenshots: Pre-patch: http://en.zimagez.com/miniature/pre28.png Post-patch: http://en.zimagez.com/miniature/post37.png Thanks.
Created attachment 6572 memory leaks Weird, it was working fine for me until I started changing themes. This revision should fix that issue. Thanks for all the testing with this!
Yes, this patch fixes the issue. No more apparent memory leakage as well. Thanks.
Thanks! Pushed to master in: commit 6eaf8f868ed9ed8018385e16a92eaacef3c32a9d Author: Eric Koegel <eric.koegel@gmail.com> Date: Mon Dec 28 16:12:00 2015 +0300 plugin: Fix a couple memory leaks (Bug #12332) Found a couple spots where we inadvertently leak memory. Signed-off-by: Eric Koegel <eric.koegel@gmail.com> http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=6eaf8f868ed9ed8018385e16a92eaacef3c32a9d