diff options
author | Simon Hausmann <[email protected]> | 2013-09-19 09:32:42 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-09-20 14:27:39 +0200 |
commit | 57f7545f67d517d1c6cdbbf972db85cabe5ef8cf (patch) | |
tree | 1f1ad352bfeb18e0c895891013cd4d47ed9a15f8 /src/qml/compiler/qv4compileddata_p.h | |
parent | 064c2f8f0d97b97895ebc3ec2b5e2b1ff4c9f2b4 (diff) |
Fix destruction of QV4::CompiledData::CompilationUnit objects
Now that we store them per QML file, they live in the type cache and
can outlive the engine. Therefore the engine needs to free to unlink
any remaining units upon destruction. This needs to be done after the
"death" of the memory manager, which is likely to sweep away any
function objects that also hold a reference to the compilation units.
Change-Id: I3968d5995289e8d2bc1e3abbb1f8be88a0ab4e03
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 0362c55a65..774cd70608 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -468,6 +468,7 @@ struct Q_QML_EXPORT CompilationUnit // QVector<QV4::Function *> runtimeFunctionsSortedByAddress; QV4::Function *linkToEngine(QV4::ExecutionEngine *engine); + void unlink(); virtual QV4::ExecutableAllocator::ChunkOfPages *chunkForFunction(int /*functionIndex*/) { return 0; } |