mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
dispose snapshot only if new file differs from the old file
This commit is contained in:
parent
ba3d2dbd14
commit
7d6f8f33ce
@ -1868,7 +1868,7 @@ namespace ts {
|
||||
newSourceFile.nameTable = undefined;
|
||||
|
||||
// dispose all resources held by old script snapshot
|
||||
if (sourceFile.scriptSnapshot) {
|
||||
if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) {
|
||||
if (sourceFile.scriptSnapshot.dispose) {
|
||||
sourceFile.scriptSnapshot.dispose();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user