---
title: CFMessagePortInvalidationCallBack
framework: corefoundation
role: symbol
role_heading: Type Alias
path: corefoundation/cfmessageportinvalidationcallback
---

# CFMessagePortInvalidationCallBack

Callback invoked when a CFMessagePort object is invalidated.

## Declaration

```swift
typealias CFMessagePortInvalidationCallBack = (CFMessagePort?, UnsafeMutableRawPointer?) -> Void
```

## Parameters

- `ms`: The message port that has been invalidated.
- `info`: The info member of the doc://com.apple.corefoundation/documentation/CoreFoundation/CFMessagePortContext structure that was used when creating ms, if ms is a local port; NULL if ms is a remote port.

## Discussion

Discussion Your callback should free any resources allocated for ms. You specify this callback with CFMessagePortSetInvalidationCallBack(_:_:).

## See Also

### Callbacks

- [CFMessagePortCallBack](corefoundation/cfmessageportcallback.md)
