From e15c70054963cd990d2c99fbaebfd0241bcf2c7b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 9 Jul 2015 14:45:39 -0700 Subject: [PATCH] clean old program to prevent it from being captured into the closure --- src/compiler/program.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 2aeab800f0f..957b519af5e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -188,6 +188,9 @@ namespace ts { verifyCompilerOptions(); + // unconditionally set oldProgram to undefined to prevent it from being captured in closure + oldProgram = undefined; + programTime += new Date().getTime() - start; program = {