* Release fields on a finished compilation that nothing reads after emit, * so the heap can shrink while user code still holds the Stats reference. * Recurses into child compilations. Stats output is preserved — only * codeGen byproducts are dropped. * @param {Compilation} compilation finish
(compilation)
| 511 | * @returns {void} |
| 512 | */ |
| 513 | _releaseUnusedCompilationData(compilation) { |
| 514 | for (const child of compilation.children) { |
| 515 | this._releaseUnusedCompilationData(child); |
| 516 | } |
| 517 | // Rendered source per (module × runtime) — used only during seal/emit, |
| 518 | // never read by Stats, and not serialized to the persistent cache. |
| 519 | if (compilation.codeGenerationResults !== undefined) { |
| 520 | compilation.codeGenerationResults.map.clear(); |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | /** |
| 525 | * Returns a compiler watcher. |
no test coverage detected