Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't zero-out builder fields in finishBuild()
The builder itself shouldn't be retained after package construction, so there shouldn't be a need to nullify its fields. Running the benchmark script shows this CL has no effect on memory. The line wrapping `targets` in an unmodifiable map dates back to unknown commit, and at that point was needed because Package didn't copy the map itself in `finishInit()` but just pointed to the builder's map. Eliminating these nullifications makes it easier to make these fields `private` in `TargetRegistrationEnvironment`. Work toward #19922. PiperOrigin-RevId: 678401129 Change-Id: Ica887b69fb795aaebf00d86e666b2817aa0ef659
- Loading branch information