Release reporter destination references after finalization

This commit is contained in:
2026-11-07 15:44:55 +00:00
parent 7c7d1df13f
commit 8dbb25aba9
4 changed files with 50 additions and 2 deletions

View File

@@ -327,6 +327,8 @@ func (r *Reporter) finalize(outcome Outcome, completion func(*Reporter)) Outcome
state.closed = true
state.deferred = nil
outcome.Presentation = state.presentationLocked()
state.output.writer = nil
state.diagnostics.writer = nil
state.mu.Unlock()
return normalizeOutcome(outcome)
}