--expose-gc


稳定性: 1 - 实验性的。此标志是从 V8 继承的,可能会在上游发生变化。

¥Stability: 1 - Experimental. This flag is inherited from V8 and is subject to change upstream.

此标志将公开 V8 的 gc 扩展。

¥This flag will expose the gc extension from V8.

if (globalThis.gc) {
  globalThis.gc();
}