<!--
{
  "availability" : [
    "iOS: 2.0.0 - 27.0.0",
    "iPadOS: 2.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.4.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CFNetwork",
  "identifier" : "/documentation/CFNetwork/CFNetServiceMonitorInvalidate(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "CFNetwork"
    ],
    "preciseIdentifier" : "c:@F@CFNetServiceMonitorInvalidate"
  },
  "title" : "CFNetServiceMonitorInvalidate(_:)"
}
-->

# CFNetServiceMonitorInvalidate(_:)

Invalidates an instance of a Network Service monitor object.

```
func CFNetServiceMonitorInvalidate(_ monitor: CFNetServiceMonitor)
```

## Parameters

`monitor`

CFNetServiceMonitor to invalidate; cannot be `NULL`.

## Discussion

This function invalidates the specified Network Service monitor so that it cannot be used again. Before you call this function, you should call [`CFNetServiceMonitorStop(_:_:)`](/documentation/CFNetwork/CFNetServiceMonitorStop(_:_:)). If the monitor has not already been stopped, this function stops the monitor for you.

### Special Considerations

This function is thread safe.

---

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)