MCPcopy
hub / github.com/webpack/webpack / _releaseUnusedCompilationData

Method _releaseUnusedCompilationData

lib/Compiler.js:513–522  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 2

closeMethod · 0.95
constructorMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected