For now, the garbage collector runs every 15th time an object is allocated. This is strategy was just chosen at random. A better strategy should be used. In order to make a good decision on when to run the GC, the interpreter should probably track how much memory it has allocated on the heap.
For now, the garbage collector runs every 15th time an object is allocated. This is strategy was just chosen at random. A better strategy should be used. In order to make a good decision on when to run the GC, the interpreter should probably track how much memory it has allocated on the heap.