mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
1449c5c8ff
The JIT compiler has a mapping from component to the owning NgModule and tracks whether a certain NgModule class has been verified; these maps causes any JIT compiled component and NgModule to be retained even if they are no longer referenced from anywhere else. This commit switches the maps to `WeakMap` to allow garbage collecting any components and NgModules that are no longer referenced elsewhere. Fixes #19997 PR Close #42003