3 import "scarceResourceCopyImportDifferent.var.js" as ScarceResourceCopyImportJs
5 // in this case, the ScarceResourceCopyImportJs returns a _new_, different
6 // scarce resource each time. Invalidating one will not invalidate the others.
9 // this binding is evaluated once, prior to the resource being released
10 property var scarceResourceImportedCopy: ScarceResourceCopyImportJs.importScarceResource()
12 // the following properties are assigned on component completion.
13 property bool arePropertiesEqual
14 property var scarceResourceAssignedCopyOne;
15 property var scarceResourceAssignedCopyTwo;
16 Component.onCompleted: {
17 scarceResourceAssignedCopyOne = ScarceResourceCopyImportJs.importScarceResource();
18 arePropertiesEqual = (scarceResourceAssignedCopyOne != scarceResourceImportedCopy); // they're not the same object.
19 ScarceResourceCopyImportJs.destroyScarceResource(); // makes the MOST RECENT resource invalid (ie, assignedCopyOne).
20 scarceResourceAssignedCopyTwo = ScarceResourceCopyImportJs.importScarceResource();