Commit 4405725
authored
fix(language-service): address potential memory leak during project creation
This addresses a potential memory leak in plugin-factory.ts.
The require call inside the create function reloads the entire language
service module for every new project, which is inefficient and could be a cause of the memory leak during branch
switching. This ensures the module is loaded only once and the same
instance is shared across all projects.1 parent 033ea75 commit 4405725
File tree
2 files changed
+7
-2
lines changed- packages/language-service
- vscode-ng-language-service/server/src
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
709 | 714 | | |
710 | 715 | | |
711 | 716 | | |
| |||
969 | 974 | | |
970 | 975 | | |
971 | 976 | | |
| 977 | + | |
972 | 978 | | |
973 | 979 | | |
974 | 980 | | |
| |||
0 commit comments