diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-01-31 15:41:58 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-02-02 05:46:20 +0000 |
commit | 7bd5d93899ca6c2175d6937f2011428c654bff02 (patch) | |
tree | fc10819f2e6d98cfaf0052d9b285f2745bd3d8c1 /src/quick/items/qquickloader_p.h | |
parent | f7ffed94c1540e015794a8d6d4910e8ca87c15e1 (diff) |
Fix memory leak with QtQuick compiler generated files
When for the QQC code path we do QML type re-compilation, we allocate a
new QV4::CompiledData::Unit. We must make sure that this dynamically
allocated memory is released in QV4::CompiledData::CompilationUnit's
destructor, by ensuring that the StaticData flag is not set.
This isn't directly applicable to the ahead-of-time generated cache file
unit data as they will always be re-generated (and thus the unsetting of
StaticData at the end of createCompilationUnit::createUnitData()), but
I've added a test-case nevertheless to ensure the correct engine
behavior.
Change-Id: I16973d7989567892bf8bf9dd6214bf293055d260
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/quick/items/qquickloader_p.h')
0 files changed, 0 insertions, 0 deletions