finalSummary(_:_:)
Determines how to handle summary data when a progress manager is deinitialized.
Declaration
static func finalSummary(_ parentSummary: Self.Summary, _ selfSummary: Self.Summary) -> Self.SummaryParameters
- parentSummary:
The current summary value of the parent progress manager.
- selfSummary:
The final summary value from the progress manager being deinitialized.
Return Value
The updated summary that replaces the parent’s current summary.
Discussion
This method is used when a progress manager in the hierarchy is being deinitialized and its accumulated summary needs to be processed in relation to its parent’s summary. The behavior can vary depending on the property type:
For additive properties (like file counts, byte counts): The self summary is typically added to the parent summary to preserve the accumulated progress.
For max-based properties (like estimated time remaining): The parent summary is typically preserved as it represents an existing estimate.
For collection-based properties (like file URLs): The self summary may be discarded to avoid accumulating stale references.