Ensure JS-owned QObjects are cleaned up on v8engine dtor
authorChris Adams <christopher.adams@nokia.com>
Mon, 22 Aug 2011 05:04:01 +0000 (15:04 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 30 Sep 2011 08:37:05 +0000 (10:37 +0200)
commit5d62a90fe129b09ecc6526ccd815469ef4ff774d
treeb09d2e2f6bcb07fbb07aefbddbc0a58fbb4bc096
parentbc2f2c56296a77b215ccdf2ee907ef669e6ab609
Ensure JS-owned QObjects are cleaned up on v8engine dtor

This commit ensures that the garbage collector is invoked during
engine destruction.  This commit also adds a unit test which
ensures that the JS GC destroys JS-owned C++ objects correctly
when the QDeclarativeEngine is destroyed.

Task-number: QTBUG-20377
Change-Id: I2de1f2dfd1e60cc2f76abb523b99bf169d2a5a13
Reviewed-on: http://codereview.qt-project.org/3285
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/qml/qdeclarativeengine.cpp
tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreationOwnership.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp
tests/auto/declarative/qdeclarativeecmascript/testtypes.h
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp