$ cnpm install expose-gc
Have your cake and eat it too
If for some reason you don't have access to how node is started or you haven't bothered with setting v8 flags, this module exposes the real gc for you.
npm i expose-gc
require('expose-gc');
global.gc();
const gc = require('expose-gc/function');
gc();
Copyright 2013 - present © cnpmjs.org | Home |