diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/propertyVarImplicitOwnership.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/propertyVarImplicitOwnership.qml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/propertyVarImplicitOwnership.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarImplicitOwnership.qml new file mode 100644 index 0000000000..9cebded932 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/propertyVarImplicitOwnership.qml @@ -0,0 +1,26 @@ +import QtQuick 2.0 + +Item { + id: root + objectName: "separateRootObject" + property var vp + + function constructGarbage() { + var retn = 1; + var component = Qt.createComponent("PropertyVarCircularComponent4.qml"); + if (component.status == Component.Ready) { + retn = component.createObject(null); // has JavaScript ownership + } + return retn; + } + + function assignCircular() { + vp = constructGarbage(); + gc(); + } + + function deassignCircular() { + vp = 2; + gc(); + } +} |