blob: 507172524e828655f1b4c0b651bbc4838b721ca2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
var x = 13;
function ReturnArray() {
return Array;
}
function ReturnObject() {
return Object;
}
function ReturnX() {
return x;
}
y = null;
function ReturnY() {
return y;
}
z = "3";
z = null;
function ReturnZ() {
return z;
}
for (var i = 0; i < 100; i++)
ReturnArray();
for (var i = 0; i < 100; i++)
ReturnX();
for (var i = 0; i < 100; i++)
ReturnZ();
gc();
assertEq(ReturnArray(), Array);
assertEq(ReturnObject(), Object);
assertEq(ReturnX(), 13);
assertEq(ReturnY(), null);
assertEq(ReturnZ(), null);
|