---
title: "CFRunLoopTimerInvalidate(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfrunlooptimerinvalidate(_:)"
---

# CFRunLoopTimerInvalidate(_:)

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

## Declaration

```swift
func CFRunLoopTimerInvalidate(_ timer: CFRunLoopTimer!)
```

## Parameters

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

## Discussion

Discussion Once invalidated, timer will never fire and call its callback function again. This function automatically removes timer 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 timer.

## See Also

### CFRunLoopTimer Miscellaneous Functions

- [CFRunLoopTimerCreateWithHandler(_:_:_:_:_:_:)](corefoundation/cfrunlooptimercreatewithhandler(_:_:_:_:_:_:).md)
- [CFRunLoopTimerCreate(_:_:_:_:_:_:_:)](corefoundation/cfrunlooptimercreate(_:_:_:_:_:_:_:).md)
- [CFRunLoopTimerDoesRepeat(_:)](corefoundation/cfrunlooptimerdoesrepeat(_:).md)
- [CFRunLoopTimerGetContext(_:_:)](corefoundation/cfrunlooptimergetcontext(_:_:).md)
- [CFRunLoopTimerGetInterval(_:)](corefoundation/cfrunlooptimergetinterval(_:).md)
- [CFRunLoopTimerGetNextFireDate(_:)](corefoundation/cfrunlooptimergetnextfiredate(_:).md)
- [CFRunLoopTimerGetOrder(_:)](corefoundation/cfrunlooptimergetorder(_:).md)
- [CFRunLoopTimerGetTypeID()](corefoundation/cfrunlooptimergettypeid().md)
- [CFRunLoopTimerIsValid(_:)](corefoundation/cfrunlooptimerisvalid(_:).md)
- [CFRunLoopTimerSetNextFireDate(_:_:)](corefoundation/cfrunlooptimersetnextfiredate(_:_:).md)
