doc: fix some typos in .qml files
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / scarceResourceTestPreserve.variant.qml
1 import QtQuick 2.0
2 import Qt.test 1.0
3 import "scarceResourceTest.variant.js" as ScarceResourceProviderJs
4
5 // In this case, the scarce resource is explicitly preserved.
6 // It should not be automatically released after the evaluation
7 // of the binding is complete, but instead will be kept in
8 // memory until the JS garbage collector runs.
9
10 QtObject {
11     property MyScarceResourceObject a;
12     a: MyScarceResourceObject { id: scarceResourceProvider }
13     property int scarceResourceTest: ScarceResourceProviderJs.importPreservedScarceResource(scarceResourceProvider),100 // return 100, but the resource should be preserved.
14 }
15