addCleanup method
Register resources owned by this attempt.
These callbacks run after adapter-specific close work and before the attempt runtime scope is restored. Both execution paths use this same owner so setup failures and normal completion drain resources uniformly.
Implementation
void addCleanup(Future<void> Function() callback) => _cleanup.add(callback);