Comment 2 for bug 753269

Revision history for this message
Richard Dale (rdale) wrote : Re: unity-2d-spread crashes on change of workspace

While I was investigating this bug, I noticed that in WindowsList::removeWindow(), a 'WindowInfo*' pointer is being removed from the m_windows list, and isn't deleted:

    for (int i = 0; i < m_windows.length(); i++) {
        if (m_windows.at(i)->isSameBamfWindow(window)) {
            beginRemoveRows(QModelIndex(), i, i);
            m_windows.removeAt(i);
            endRemoveRows();
            return;
        }
    }

Shouldn't it be 'delete m_windows.takeAt(i);' instead, to avoid a memory leak?