Bug 282106

Summary: Solid leaks memory in Amarok
Product: kde-windows Reporter: Sam Lade <sam>
Component: generalAssignee: KDE-Windows <kde-windows>
Status: RESOLVED FIXED    
Severity: normal CC: crestor
Priority: NOR    
Version: 4.7   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Sam Lade 2011-09-15 21:42:07 UTC
Version:           4.7.0 (using KDE 4.7.0) 
OS:                MS Windows

Amarok gains ~4-30KB of RAM usage per second while running in Windows, irrespective of usage.
Traces point to the wmi backend of Solid:
http://pastebin.com/J49iNWwW
http://pastebin.com/bNskPSmF
It appears to be polling devices every second and not removing objects generated in the process afterwards. Debugger shows:
("/org/kde/solid/wmi/volume/deviceid/a:", "/org/kde/solid/wmi/volume/deviceid/c:", ...
etc for all devices once per second.

Confirmed by multiple reports in #kde-windows.

Reproducible: Always

Steps to Reproduce:
Open Amarok. Wait.

Actual Results:  
Memory usage grows steadily.

Expected Results:  
Memory usage is approximately constant.
Comment 1 Patrick Spendrin 2011-09-17 22:07:15 UTC
Git commit 6cea4fcf314799a19bf2259789d738e1c5c8d404 by Patrick Spendrin.
Committed on 18/09/2011 at 00:06.
Pushed by sengels into branch 'KDE/4.7'.

fix memory leak in solid
BUG:282106

M  +5    -4    solid/solid/backends/wmi/wmidevice.cpp
M  +30   -4    solid/solid/backends/wmi/wmiquery.cpp
M  +13   -5    solid/solid/backends/wmi/wmiquery.h

http://commits.kde.org/kdelibs/6cea4fcf314799a19bf2259789d738e1c5c8d404