mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-11-14 03:20:04 +00:00
CObjMethod refactor
This commit is contained in:
18
examples/stress.cosmo
Normal file
18
examples/stress.cosmo
Normal file
@@ -0,0 +1,18 @@
|
||||
class Test
|
||||
function __init(self, x)
|
||||
self.x = x
|
||||
end
|
||||
|
||||
function print(self)
|
||||
print(self.x)
|
||||
end
|
||||
end
|
||||
|
||||
-- stressing the GC
|
||||
local i = 0
|
||||
while true do
|
||||
var x = Test("Hello world " .. i)
|
||||
x.print()
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
Reference in New Issue
Block a user