---
title: "CFRunLoopObserverInvalidate(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfrunloopobserverinvalidate(_:)"
---

# CFRunLoopObserverInvalidate(_:)

Invalidates a CFRunLoopObserver object, stopping it from ever firing again.

## Declaration

```swift
func CFRunLoopObserverInvalidate(_ observer: CFRunLoopObserver!)
```

## Parameters

- `observer`: The run loop observer to invalidate.

## Discussion

Discussion Once invalidated, observer will never fire and call its callback function again. This function automatically removes observer from all run loop modes in which it had been added. The memory is not deallocated unless the run loop held the only reference to observer.

## See Also

### CFRunLoopObserver Miscellaneous Functions

- [CFRunLoopObserverCreateWithHandler(_:_:_:_:_:)](corefoundation/cfrunloopobservercreatewithhandler(_:_:_:_:_:).md)
- [CFRunLoopObserverCreate(_:_:_:_:_:_:)](corefoundation/cfrunloopobservercreate(_:_:_:_:_:_:).md)
- [CFRunLoopObserverDoesRepeat(_:)](corefoundation/cfrunloopobserverdoesrepeat(_:).md)
- [CFRunLoopObserverGetActivities(_:)](corefoundation/cfrunloopobservergetactivities(_:).md)
- [CFRunLoopObserverGetContext(_:_:)](corefoundation/cfrunloopobservergetcontext(_:_:).md)
- [CFRunLoopObserverGetOrder(_:)](corefoundation/cfrunloopobservergetorder(_:).md)
- [CFRunLoopObserverGetTypeID()](corefoundation/cfrunloopobservergettypeid().md)
- [CFRunLoopObserverIsValid(_:)](corefoundation/cfrunloopobserverisvalid(_:).md)
