---
title: release
framework: corefoundation
role: symbol
role_heading: Instance Property
path: corefoundation/cfbinaryheapcallbacks/release
---

# release

Callback function used to release a value before it is removed from a binary heap.

## Declaration

```swift
var release: ((CFAllocator?, UnsafeRawPointer?) -> Void)!
```

## Parameters

- `allocator`: The binary heap’s allocator.
- `ptr`: The value to release.

## Discussion

Discussion The callback used to remove a retain previously added for the binary heap from values as they are removed from the binary heap. If this field is NULL, the binary heap does nothing to release a value being removed.

## See Also

### Callbacks

- [CFBinaryHeapApplierFunction](corefoundation/cfbinaryheapapplierfunction.md)
- [compare](corefoundation/cfbinaryheapcallbacks/compare.md)
- [copyDescription](corefoundation/cfbinaryheapcallbacks/copydescription.md)
- [retain](corefoundation/cfbinaryheapcallbacks/retain.md)
- [version](corefoundation/cfbinaryheapcallbacks/version.md)
