diff options
author | Michael Brasser <michael.brasser@live.com> | 2014-02-27 15:59:39 -0600 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-28 19:01:21 +0100 |
commit | a3688bf41fd42befe7ab83a633dbbd71eda56cd9 (patch) | |
tree | 042d3b4a4a78f6787a6c641e09ff957b62b40aa5 /src/qml/qml/qqmlcontextwrapper_p.h | |
parent | 0b2d05093c6fc030d40be8c873ad1e0af9bba8cc (diff) |
Improve memory usage in QML/V4 engine.
* Don't create prototype Object for bindings and
signal handlers. It is inaccessible and not required.
This saves one Object-sized allocation per binding.
* Shrink the size of QQmlContextWrapper by removing
the v8 member variable.
* Shrink the size of QObjectWrapper by moving the destroy
identifier to the engine.
Change-Id: I76e84e4c0581e97a19d2e959f814ac84d9c431fa
Task-number: QTBUG-37134
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcontextwrapper_p.h')
-rw-r--r-- | src/qml/qml/qqmlcontextwrapper_p.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper_p.h b/src/qml/qml/qqmlcontextwrapper_p.h index 0ecec93652..3facf71aa0 100644 --- a/src/qml/qml/qqmlcontextwrapper_p.h +++ b/src/qml/qml/qqmlcontextwrapper_p.h @@ -97,9 +97,8 @@ struct Q_QML_EXPORT QmlContextWrapper : Object static void registerQmlDependencies(ExecutionEngine *context, const CompiledData::Function *compiledFunction); ReturnedValue idObjectsArray(); - ReturnedValue qmlSingletonWrapper(const StringRef &name); + ReturnedValue qmlSingletonWrapper(QV8Engine *e, const StringRef &name); - QV8Engine *v8; // ### temporary, remove bool readOnly; bool ownsContext; bool isNullWrapper; |