aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml2
-rw-r--r--benchmarks/auto/creation/quick/delegates_qobject.qml9
2 files changed, 9 insertions, 2 deletions
diff --git a/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml b/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml
index 89cded0..920b4c8 100644
--- a/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml
+++ b/benchmarks/auto/creation/quick.item/delegates_item_empty_jscreation.qml
@@ -27,7 +27,7 @@ Benchmark {
items = [];
for (var i=0; i<root.count; ++i) {
- var object = component.createObject(root);
+ var object = component.createObject();
items.push(object);
}
}
diff --git a/benchmarks/auto/creation/quick/delegates_qobject.qml b/benchmarks/auto/creation/quick/delegates_qobject.qml
index 130d722..ee9bc3d 100644
--- a/benchmarks/auto/creation/quick/delegates_qobject.qml
+++ b/benchmarks/auto/creation/quick/delegates_qobject.qml
@@ -8,6 +8,7 @@ Benchmark {
count: 50;
staticCount: 10000;
+ property var items;
onTChanged: {
allocate();
}
@@ -19,9 +20,15 @@ Benchmark {
}
function allocate() {
+ if (items && items.length) {
+ for (var i=0; i<items.length; ++i)
+ items[i].destroy();
+ }
+ items = [];
+
for (var i=0; i<root.count; ++i) {
var object = component.createObject();
- object.destroy();
+ items.push(object);
}
}
}