Cosmo/examples/stress.cosmo

15 lines
231 B
Plaintext
Raw Normal View History

2020-11-17 21:07:56 +00:00
class Test
function __init(self, x)
self.x = x
end
function print(self)
print(self.x)
end
end
-- stressing the GC
2020-11-17 21:13:51 +00:00
for (var i = 0; ; i=i+1) do
2020-11-17 21:07:56 +00:00
var x = Test("Hello world " .. i)
x.print()
end