Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- Date: Mon, 5 May 2008 03:18:32 +0200
- From: "Andreas Hartmetz" <ahartmetz@xxxxxxxxx>
- Subject: Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
2008/5/5 Kelvie Wong <kelvie@xxxxxxxx>:
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;
}
--
IIRC this is not your first code contribution, however small. Right?
In that case you might want to get an SVN account - it's not a big deal actually :)
In that case you might want to get an SVN account - it's not a big deal actually :)
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
- Follow-Ups:
- Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- From: Kelvie Wong
- Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- References:
- [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- From: Kelvie Wong
- [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- Prev by Date: Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- Next by Date: Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- Previous by thread: Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- Next by thread: Re: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
- Index(es):