Fixes the memory leak because of project and its corresponding script info even after project is removed#16494
Merged
sheetalkamat merged 4 commits intoJun 14, 2017
Conversation
…t is closed or inferred projects are refreshed Also dispose some pointers so that the closures get disposed with project and script infos
mhegazy
reviewed
Jun 13, 2017
| } | ||
|
|
||
| // Cleanup script infos that are not open and not part of any project | ||
| this.deleteOrphanScriptInfoNotInAnyProject(); |
Contributor
There was a problem hiding this comment.
I though we will do this in openClientFile?
Member
Author
There was a problem hiding this comment.
This was before discussing that.. I am working on moving this to openClientFile
|
Thanks @sheetalkamat for taking this on. Is there anyway I can help verify this bug against Code v1.13 or insider build? |
This helps in reusing script infos even if the project is closed but next open recreates the same project
mhegazy
reviewed
Jun 14, 2017
| // at this point if file is the part of some configured/external project then this project should be created | ||
| const info = this.getOrCreateScriptInfoForNormalizedPath(fileName, /*openedByClient*/ true, fileContent, scriptKind, hasMixedContent); | ||
| this.assignScriptInfoToInferredProjectIfNecessary(info, /*addToListOfOpenFiles*/ true); | ||
| this.deleteOrphanScriptInfoNotInAnyProject(); |
Contributor
There was a problem hiding this comment.
please add a comment here on why we do this on open, just to make sure ppl do not wonder in the future why this is here and not in close project.
mhegazy
approved these changes
Jun 14, 2017
Contributor
|
we need this in release-2.4 as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes microsoft/vscode#28112 and #16329