diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2012-04-19 14:38:38 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-27 10:38:58 +0200 |
commit | b765e3a84bc531878a5cc0d451451a94565b13f8 (patch) | |
tree | 4c506d229c76924a2c72de31464efa8b440f005f /src/qml/qml/v8/v8.pri | |
parent | 7ec674ee9a8e51cb1cb7ef60b1d27845349b8dec (diff) |
Avoid calling gc in QQmlEngine destructor.
GC may be expensive. GC call in QQmlEngine doesn't have much sense
because V8 will destroy all objects living in a current context.
The only problem is that V8 may decide to not invoke weak callbacks
which may cause a memory leak. To avoid that we track all QObjects that
have JavaScript ownership set and we delete them explicitly.
The change reduce time of destroying QQmlEngine by 75%, which is really
visible in qquicklistmodel test.
Change-Id: I2a3668fd23630669114baee8c241a7ecc4100e33
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/v8/v8.pri')
-rw-r--r-- | src/qml/qml/v8/v8.pri | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/v8/v8.pri b/src/qml/qml/v8/v8.pri index 52b6bf480a..33a0ad10a1 100644 --- a/src/qml/qml/v8/v8.pri +++ b/src/qml/qml/v8/v8.pri @@ -22,7 +22,8 @@ HEADERS += \ $$PWD/qv8engine_impl_p.h \ $$PWD/qv8domerrors_p.h \ $$PWD/qv8sqlerrors_p.h \ - $$PWD/qqmlbuiltinfunctions_p.h + $$PWD/qqmlbuiltinfunctions_p.h \ + $$PWD/qv8objectresource_p.h SOURCES += \ $$PWD/qv8stringwrapper.cpp \ |