27 lines
544 B
QML
27 lines
544 B
QML
import QtQuick 2.0
|
|
|
|
Item {
|
|
id: root
|
|
objectName: "separateRootObject"
|
|
property var vp
|
|
|
|
function constructGarbage() {
|
|
var retn = 1;
|
|
var component = Qt.createComponent("PropertyVarOwnershipComponent.qml");
|
|
if (component.status == Component.Ready) {
|
|
retn = component.createObject(null); // has JavaScript ownership
|
|
}
|
|
return retn;
|
|
}
|
|
|
|
function assignVarProp() {
|
|
vp = constructGarbage();
|
|
gc();
|
|
}
|
|
|
|
function deassignVarProp() {
|
|
vp = 2;
|
|
}
|
|
}
|
|
|