mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
This is an effort to keep the `meteor --get-ready` command from running out of memory during Circle CI tests, as mentioned in this comment: https://github.com/meteor/meteor/pull/8327#issuecomment-284431618
13 lines
457 B
JavaScript
13 lines
457 B
JavaScript
// For this global function to be defined, the --expose-gc flag must have
|
|
// been passed to node at the bottom of the ../../meteor script, probably
|
|
// via the TOOL_NODE_FLAGS environment variable.
|
|
const gc = global.gc;
|
|
|
|
// In the future, this function may become smarter about how often it
|
|
// actually calls the gc function, but that's an implementation detail.
|
|
export function requestGarbageCollection() {
|
|
if (typeof gc === "function") {
|
|
gc();
|
|
}
|
|
}
|