File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -2475,6 +2475,10 @@ module ts {
2475
2475
}
2476
2476
}
2477
2477
2478
+ // hostCache is captured in the closure for 'getOrCreateSourceFile' but it should not be used past this point.
2479
+ // It needs to be cleared to allow all collected snapshots to be released
2480
+ hostCache = undefined ;
2481
+
2478
2482
program = newProgram ;
2479
2483
2480
2484
// Make sure all the nodes in the program are both bound, and have their parent
@@ -2483,6 +2487,7 @@ module ts {
2483
2487
return ;
2484
2488
2485
2489
function getOrCreateSourceFile ( fileName : string ) : SourceFile {
2490
+ Debug . assert ( hostCache !== undefined ) ;
2486
2491
// The program is asking for this file, check first if the host can locate it.
2487
2492
// If the host can not locate the file, then it does not exist. return undefined
2488
2493
// to the program to allow reporting of errors for missing files.
You can’t perform that action at this time.
0 commit comments