This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This snippet can help your node automatically trigger garbage collection. | |
You have to add V8 flag "--expose-gc" when you start your app. | |
usage example: (triggerMemorySize - MB, triggerInterval - Seconds, startInvervalDelay - Seconds) | |
require('/utils/garbageCollection.js'); | |
or require('/utils/garbageCollection.js')(triggerMemorySize, triggerInterval); | |
such as : | |
require('/utils/garbageCollection.js')(150, 60); |