---
title: CFAllocatorRetainCallBack
framework: corefoundation
role: symbol
role_heading: Type Alias
path: corefoundation/cfallocatorretaincallback
---

# CFAllocatorRetainCallBack

A prototype for a function callback that retains the given data.

## Declaration

```swift
typealias CFAllocatorRetainCallBack = (UnsafeRawPointer?) -> UnsafeRawPointer?
```

## Parameters

- `info`: The data to be retained.

## Discussion

Discussion A prototype for a function callback that retains the data pointed to by the info field. In implementing this function, retain the data you have defined for the allocator context in this field. (This might make sense only if the data is a Core Foundation object.)

## See Also

### Callbacks

- [CFAllocatorAllocateCallBack](corefoundation/cfallocatorallocatecallback.md)
- [CFAllocatorCopyDescriptionCallBack](corefoundation/cfallocatorcopydescriptioncallback.md)
- [CFAllocatorDeallocateCallBack](corefoundation/cfallocatordeallocatecallback.md)
- [CFAllocatorPreferredSizeCallBack](corefoundation/cfallocatorpreferredsizecallback.md)
- [CFAllocatorReallocateCallBack](corefoundation/cfallocatorreallocatecallback.md)
- [CFAllocatorReleaseCallBack](corefoundation/cfallocatorreleasecallback.md)
