forked from qt-creator/qt-creator
		
	Don't keep around references to old documents
The code completion was keeping around references to old documents after the completion finished. This caused documents to stay in memory when unloading projects, up until the next time you used the completion.
This commit is contained in:
		| @@ -1027,6 +1027,10 @@ bool CppCodeCompletion::partiallyComplete(const QList<TextEditor::CompletionItem | ||||
| void CppCodeCompletion::cleanup() | ||||
| { | ||||
|     m_completions.clear(); | ||||
|  | ||||
|     // Set empty map in order to avoid referencing old versions of the documents | ||||
|     // until the next completion | ||||
|     typeOfExpression.setDocuments(QMap<QString, Document::Ptr>()); | ||||
| } | ||||
|  | ||||
| int CppCodeCompletion::findStartOfName(const TextEditor::ITextEditor *editor) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user