QML_RUNTIME_TESTING should be disabled by default.
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / propertyVarImplicitOwnership.qml
1 import QtQuick 2.0
2
3 Item {
4     id: root
5     objectName: "separateRootObject"
6     property var vp
7
8     function constructGarbage() {
9         var retn = 1;
10         var component = Qt.createComponent("PropertyVarCircularComponent4.qml");
11         if (component.status == Component.Ready) {
12             retn = component.createObject(null); // has JavaScript ownership
13         }
14         return retn;
15     }
16
17     function assignCircular() {
18         vp = constructGarbage();
19         gc();
20     }
21
22     function deassignCircular() {
23         vp = 2;
24         gc();
25     }
26 }