Browse Source

Fix a memleak in torrentmodel.

Perhaps we should finally move to C++11 and std::unique_ptr?
adaptive-webui-19844
Ivan Sorokin 10 years ago
parent
commit
807960b768
  1. 1
      src/qtlibtorrent/torrentmodel.cpp

1
src/qtlibtorrent/torrentmodel.cpp

@ -408,6 +408,7 @@ void TorrentModel::removeTorrent(const QString &hash) @@ -408,6 +408,7 @@ void TorrentModel::removeTorrent(const QString &hash)
qDebug() << Q_FUNC_INFO << hash << row;
if (row >= 0) {
beginRemoveTorrent(row);
delete m_torrents[row];
m_torrents.removeAt(row);
endRemoveTorrent();
}

Loading…
Cancel
Save