unmount method
Cleans up the reactive pipeline when the element is removed from the tree.
Ensures:
- The underlying CoralTerminal is deactivated.
- The CoralCoupler is decoupled, freeing any topological references.
Implementation
@override
void unmount() {
try {
_trackedDependencies.clear();
_terminal.deactivate();
_coupler.decouple();
_intent._contextController.empty();
} catch (error, stackTrace) {
Zone.current.handleUncaughtError(error, stackTrace);
}
super.unmount();
}