Commit e15443e9 authored by Leandro Melo's avatar Leandro Melo Committed by Leandro T. C. Melo
Browse files

Code assist: Fix memory leak in completion

One fix is in the runner, which is part of the completion
engine itself. The other is specific for C++.

Task-number: QTCREATORBUG-5947
Change-Id: Ib8fff1eb5adad1ffb2a11da66c50b545e1457df8

Reviewed-by: default avatarQt Sanity Bot <>
Reviewed-by: default avatarFawzi Mohamed <>
parent 1edf045a
......@@ -776,6 +776,7 @@ IAssistProposal *CppCompletionAssistProcessor::createContentProposal()
} else {
delete *it;
it = m_completions.erase(it);
......@@ -34,6 +34,7 @@
#include "iassistprocessor.h"
#include "iassistproposal.h"
#include "iassistinterface.h"
#include "iassistproposalmodel.h"
using namespace TextEditor;
using namespace Internal;
......@@ -48,8 +49,11 @@ ProcessorRunner::ProcessorRunner()
delete m_processor;
if (m_discardProposal)
if (m_discardProposal && m_proposal) {
// Proposal doesn't own the model, so we need to delete both.
delete m_proposal->model();
delete m_proposal;
void ProcessorRunner::setProcessor(IAssistProcessor *computer)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment