removeObserver(_:)
Removes a previously registered observer from the system routing controller.
Declaration
final func removeObserver(_ observer: any AVSystemRouteControllerObserver)Parameters
- observer:
The observer object to remove. If the observer is not currently registered, this function has no effect.
Discussion
Call this function to unregister an observer when it no longer needs to receive routing event notifications. This is typically done in the observer’s deallocation or when the observer is no longer relevant to avoid memory leaks and unnecessary callbacks.