mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 07:22:21 +00:00
24 lines
326 B
TypeScript
24 lines
326 B
TypeScript
import "allocator/arena";
|
|
import "collector/itcm";
|
|
|
|
class Foo {
|
|
}
|
|
|
|
var arr: Foo[] = [];
|
|
|
|
gc.collect(); // should do nothing
|
|
|
|
arr[0] = {};
|
|
|
|
gc.collect(); // should do nothing
|
|
|
|
arr[1] = {};
|
|
|
|
gc.collect(); // should do nothing
|
|
|
|
arr[0] = {};
|
|
|
|
gc.collect(); // should collect the old one
|
|
|
|
export function main(): i32 { return 0; }
|