diff options
author | Chris Adams <christopher.adams@nokia.com> | 2011-10-05 17:37:12 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-05 10:41:32 +0200 |
commit | 1a36b216b19919f4489881bc5807b14cdb74c167 (patch) | |
tree | 05360ee700f3652dcdf5e857ae63b039999c8e6c /src | |
parent | 17aa5272d8f20f3e64e3bcb5c1c5bb1af8e1c7f2 (diff) |
Ensure all persistent handles are disposed properly
Previously, some handles were leaking, which was causing a dramatic
slowdown in v8 gc speed over time.
Change-Id: I1e8d674b48647b7a0063a4b1c8d83130795502a0
Reviewed-on: http://codereview.qt-project.org/6026
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qdeclarativesqldatabase.cpp | 1 | ||||
-rw-r--r-- | src/declarative/qml/v8/qv8engine.cpp | 5 | ||||
-rw-r--r-- | src/declarative/qml/v8/qv8gccallback_p.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp index 687aec9448..7fc62078f3 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -197,6 +197,7 @@ QDeclarativeSqlDatabaseData::~QDeclarativeSqlDatabaseData() { qPersistentDispose(constructor); qPersistentDispose(queryConstructor); + qPersistentDispose(rowsConstructor); } static QString qmlsqldatabase_databasesPath(QV8Engine *engine) diff --git a/src/declarative/qml/v8/qv8engine.cpp b/src/declarative/qml/v8/qv8engine.cpp index 33c87b7196..5259ab19b4 100644 --- a/src/declarative/qml/v8/qv8engine.cpp +++ b/src/declarative/qml/v8/qv8engine.cpp @@ -1390,6 +1390,11 @@ QV8GCCallback::Node::~Node() node.remove(); } +QV8GCCallback::Referencer::~Referencer() +{ + qPersistentDispose(strongReferencer); +} + QV8GCCallback::Referencer::Referencer() { v8::HandleScope handleScope; diff --git a/src/declarative/qml/v8/qv8gccallback_p.h b/src/declarative/qml/v8/qv8gccallback_p.h index 095c0e5bac..f5f7d8b22c 100644 --- a/src/declarative/qml/v8/qv8gccallback_p.h +++ b/src/declarative/qml/v8/qv8gccallback_p.h @@ -70,7 +70,7 @@ public: class Referencer { public: - ~Referencer() {} + ~Referencer(); void addRelationship(QObject *object, v8::Persistent<v8::Value> handle); void addRelationship(QObject *object, QObject *other); private: |