summaryrefslogtreecommitdiffstats
path: root/kjsembed/tests/test_gc.js
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/tests/test_gc.js')
-rwxr-xr-xkjsembed/tests/test_gc.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/kjsembed/tests/test_gc.js b/kjsembed/tests/test_gc.js
new file mode 100755
index 00000000..aa1e11af
--- /dev/null
+++ b/kjsembed/tests/test_gc.js
@@ -0,0 +1,21 @@
+print( "Hello World" )
+var arr = new Array();
+
+for( var idx = 0; idx < 500; ++idx )
+{
+ arr[idx] = new QLabel(this);
+ arr[idx].text = "foo " + idx;
+}
+
+for( var idx = 0; idx < 500; ++idx )
+{
+ println( arr[idx].text );
+ arr[idx] = new QLabel(this);
+ arr[idx].text = "bar " + idx;
+}
+
+for( var idx = 0; idx < 500; ++idx )
+{
+ println( arr[idx].text );
+}
+