<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFRunLoopRemoveSource(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFRunLoopRemoveSource"
  },
  "title" : "CFRunLoopRemoveSource(_:_:_:)"
}
-->

# CFRunLoopRemoveSource(_:_:_:)

Removes a CFRunLoopSource object from a run loop mode.

```
func CFRunLoopRemoveSource(_ rl: CFRunLoop!, _ source: CFRunLoopSource!, _ mode: CFRunLoopMode!)
```

## Parameters

`rl`

The run loop to modify.

`source`

The run loop source to remove.

`mode`

The run loop mode of `rl` from which to remove `source`. Use the constant [`commonModes`](/documentation/CoreFoundation/CFRunLoopMode/commonModes) to remove `source` from the set of objects monitored by all the common modes.

## Discussion

If `source` is a version 0 source, this function calls the `cancel` callback function specified in the context structure for `source`. See [`CFRunLoopSourceContext`](/documentation/CoreFoundation/CFRunLoopSourceContext) and [`CFRunLoopSourceContext1`](/documentation/CoreFoundation/CFRunLoopSourceContext1)for more details.

If `rl` does not contain `source` in `mode`, this function does nothing.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)