mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 15:17:07 +00:00
[CFE/DDC] Fix leak caused by cached diagnosticReporter
In 8f4e5c8194
the `DiagnosticReporter` was cached in
`DevCompilerTarget` which introduced a memory leak.
Unfortunately our weekly bot that looks for leaks has been out of
commission, but is now coming back online.
This CL fixes the leak by overwriting the field every time, meaing we
don't save a reference to the first one (which is a leak).
Maybe ideally we shouldn't save it as a field at all, but that's a
potential for another day.
Change-Id: Ic740a212c436c475688a1de73c55a2344301e688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325260
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
5282f6e33f
commit
cef9865586
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ class DevCompilerTarget extends Target {
|
|||
{void Function(String msg)? logger,
|
||||
ChangedStructureNotifier? changedStructureNotifier}) {
|
||||
_nativeClasses ??= JsInteropChecks.getNativeClasses(component);
|
||||
_diagnosticReporter ??=
|
||||
_diagnosticReporter =
|
||||
diagnosticReporter as DiagnosticReporter<Message, LocatedMessage>;
|
||||
_performTransformations(coreTypes, hierarchy, libraries);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue