Document function limitation of var properties
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeecmascript / data / scarceResourceTestPreserve.var.qml
1 import QtQuick 2.0
2 import Qt.test 1.0
3 import "scarceResourceTest.var.js" as ScarceResourceProviderJs
4
5 // In this case, the scarce resource is explicity 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