<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFBinaryHeapCallBacks/release",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@SA@CFBinaryHeapCallBacks@FI@release"
  },
  "title" : "release"
}
-->

# release

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

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

## Parameters

`allocator`

The binary heap’s allocator.

`ptr`

The value to release.

## 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.

---

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)