---
title: xpc_finalizer_t
framework: xpc
role: symbol
role_heading: Type Alias
path: xpc/xpc_finalizer_t
---

# xpc_finalizer_t

A function to invoke when tearing down a connection and freeing its context.

## Declaration

```swift
typealias xpc_finalizer_t = (UnsafeMutableRawPointer?) -> Void
```

## Parameters

- `value`: The context object that is to be disposed of.

## Discussion

Discussion It is not safe to reference the connection from within this function.

## See Also

### Context

- [xpc_connection_set_context(_:_:)](xpc/xpc_connection_set_context(_:_:).md)
- [xpc_connection_get_context(_:)](xpc/xpc_connection_get_context(_:).md)
- [xpc_connection_set_finalizer_f(_:_:)](xpc/xpc_connection_set_finalizer_f(_:_:).md)
