mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
41 lines
483 B
Plaintext
41 lines
483 B
Plaintext
//test this logic for memory leaks
|
|
{
|
|
import compound;
|
|
import timer;
|
|
|
|
fn start(k, v) {
|
|
return startTimer();
|
|
}
|
|
|
|
fn check(k, v) {
|
|
var l = v.stopTimer();
|
|
print l.timerToString();
|
|
l.destroyTimer();
|
|
return v;
|
|
}
|
|
|
|
fn destroy(k, v) {
|
|
v.destroyTimer();
|
|
}
|
|
|
|
var arr = [1];
|
|
|
|
arr
|
|
.map(start)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(check)
|
|
.map(destroy)
|
|
;
|
|
}
|
|
|
|
|
|
print "All good";
|