"use strict";
console.log('start')
var i = 0;
var timeout = null
function fn () {
i++
console.log(process.memoryUsage());
if (i == 10000) {
clearTimeout(timeout);
console.log(process.memoryUsage());
}
global.gc();
}
timeout = setInterval(fn, 10);