fix(compiler-cli): fix memory leak in program creation (#20692)
Saving `oldProgram` in `AngularCompilerProgram` instances is causing a memory leak for unemitted programs. It's not actually used so simply not saving it fixes the memory leak. Fix #20691 PR Close #20692
This commit is contained in:
parent
3def2cc552
commit
71e5de646b
|
@ -61,7 +61,7 @@ class AngularCompilerProgram implements Program {
|
|||
|
||||
constructor(
|
||||
private rootNames: string[], private options: CompilerOptions, private host: CompilerHost,
|
||||
private oldProgram?: Program) {
|
||||
oldProgram?: Program) {
|
||||
const [major, minor] = ts.version.split('.');
|
||||
if (Number(major) < 2 || (Number(major) === 2 && Number(minor) < 4)) {
|
||||
throw new Error('The Angular Compiler requires TypeScript >= 2.4.');
|
||||
|
|
Loading…
Reference in New Issue