Commit 2f88a46e authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Christian Kamm

C++: Fix memory leak in preprocessor.

This addresses the main memory leak revealed in QTCREATORBUG-7645.
The other leaks seem to have their origin in Qt.

Task-Number: QTCREATORBUG-7645.
Change-Id: I77f45449416c143b222ed5f5c905cba9674f95bb
Reviewed-by: default avatarChristian Kamm <kamm@incasoftware.de>
parent adb40fad
......@@ -1297,6 +1297,8 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
removeTrailingOutputLines();
delete m_state.m_lexer;
while (m_state.m_tokenBuffer)
m_state.popTokenBuffer();
m_state = savedState;
m_env->currentFile = previousFileName;
......
Markdown is supported
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