diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-09 16:45:02 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-12 13:29:27 +0200 |
commit | 7c2adbbb6cccefd202164049dc9144b4d13aec0a (patch) | |
tree | 7410500f53aac1b8fe2a46729db48732744ebf4b /src/qml/jsruntime/qv4script_p.h | |
parent | 42dc821dd68cc63aa8300f2678639dbaacda1057 (diff) |
Add reference counting to the VM functions
This reduces memory pressure, keep engine->functions small and thus makes back
trace lookup faster. It became visible for example in the QtQuickControls
auto-tests that use plenty of loaders and we ended up with 30k+ functions.
Change-Id: Iaa5981f44e1e49ad9417a50c1e6a74946090dd28
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4script_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index 274a87db26..20f9285879 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -59,6 +59,7 @@ struct Q_QML_EXPORT Script { : sourceFile(source), line(line), column(column), sourceCode(sourceCode) , scope(engine->rootContext), strictMode(false), inheritContext(true), parsed(false) , qml(Value::fromObject(qml)), vmFunction(0), parseAsBinding(true) {} + ~Script(); QString sourceFile; int line; int column; |