Web lists-archives.org

[PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder




This would leak memory every time compositing takes place, and really adds up
over time (I get about 500k/minute with a bunch of windows open).  KWin stays at
a lean 23MB after this patch.

This was introduced by r800581.
---
 workspace/kwin/layers.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/workspace/kwin/layers.cpp b/workspace/kwin/layers.cpp
index 1b845eb..e5e52b8 100644
--- a/workspace/kwin/layers.cpp
+++ b/workspace/kwin/layers.cpp
@@ -740,6 +740,10 @@ ToplevelList Workspace::rootStackingOrder() const
         }
     foreach( Deleted* c, deleted )
         ret.append( c );
+
+    if (windows)
+        XFree(windows);
+
     return ret;
     }
 
-- 
1.5.5.GIT

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<