Prevent the root object from being garbage collected.
authorMichael Brasser <michael.brasser@nokia.com>
Fri, 23 Mar 2012 03:18:04 +0000 (13:18 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 23 Mar 2012 07:04:08 +0000 (08:04 +0100)
commit91f9f123eb67bbdb2a0e65df6f29c6833635679b
treeacbf962f29f663c2f1110d75b5a35763ad754677
parentb63ce68f316c91b0a3107d3d20e160628f5cefef
Prevent the root object from being garbage collected.

Passing the root object as a return value from a C++ function could
cause the indestructible flag to be set to false.

Change-Id: Ib70c666f0d0ffbb48bca1996c2517fbccafa5dc1
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
src/qml/qml/qqmlcomponent.cpp
src/qml/qml/qqmlincubator.cpp
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
tests/auto/qml/qqmlecmascript/data/ownershipConsistency.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/ownershipRootObject.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp