While I was investigating a unity-2d-spread crash bug I noticed that there was
a memory leak in the WindowsList::removeWindow() method. When a WindowInfo*
pointer was removed from the list it wasn't being deleted. Please find attached
a patch to fix this.
-- Richard
=== modified file 'libunity-2d-private/Unity2d/windowslist.cpp'
--- libunity-2d-private/Unity2d/windowslist.cpp 2011-02-08 11:48:16 +0000
+++ libunity-2d-private/Unity2d/windowslist.cpp 2011-04-12 14:18:13 +0000
@@ -183,7 +183,7 @@
for (int i = 0; i < m_windows.length(); i++) {
if (m_windows.at(i)->isSameBamfWindow(window)) {
beginRemoveRows(QModelIndex(), i, i);
- m_windows.removeAt(i);
+ delete m_windows.takeAt(i);
endRemoveRows();
return;
}
_______________________________________________
Mailing list: https://launchpad.net/~ayatana-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~ayatana-dev
More help : https://help.launchpad.net/ListHelp