forked from qt-creator/qt-creator
C++: Release more documents.
- fix memory leak in find-usages - do not retain snapshot in search history - when an editor is invisible for more than 2 minutes, release the backing snapshot Retaining snapshots will retain their documents, and if done for too long, the memory consumption might grow. This is especially the case when switching to a different kit (Qt version): in that case, the new versions of headers will be indexed, while the old ones stay around. Task-number: QTCREATORBUG-5583 Task-number: QTCREATORBUG-7645 Task-number: QTCREATORBUG-9842 Change-Id: I045eda1565e0a3fa702baeffaab9c12662f90289 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
d58da4bd7e
commit
566be0995d
@@ -78,7 +78,10 @@ public:
|
||||
|
||||
CPlusPlus::DependencyTable updateDependencyTable(CPlusPlus::Snapshot snapshot);
|
||||
|
||||
private Q_SLOTS:
|
||||
public slots:
|
||||
void flushDependencyTable();
|
||||
|
||||
private slots:
|
||||
void displayResults(int first, int last);
|
||||
void searchFinished();
|
||||
void cancel();
|
||||
@@ -101,7 +104,7 @@ private:
|
||||
const CPlusPlus::Snapshot &snapshot, CPlusPlus::LookupContext *context);
|
||||
|
||||
private:
|
||||
QPointer<CppModelManagerInterface> _modelManager;
|
||||
QPointer<CppModelManagerInterface> m_modelManager;
|
||||
QMap<QFutureWatcher<CPlusPlus::Usage> *, QPointer<Find::SearchResult> > m_watchers;
|
||||
|
||||
mutable QMutex m_depsLock;
|
||||
|
||||
Reference in New Issue
Block a user