---
title: "CFBinaryHeapAddValue(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbinaryheapaddvalue(_:_:)"
---

# CFBinaryHeapAddValue(_:_:)

Adds a value to a binary heap.

## Declaration

```swift
func CFBinaryHeapAddValue(_ heap: CFBinaryHeap!, _ value: UnsafeRawPointer!)
```

## Parameters

- `heap`: The binary heap to use.
- `value`: The value to add to the binary heap. The value is retained by the binary heap using the retain callback provided in the doc://com.apple.corefoundation/documentation/CoreFoundation/CFBinaryHeapCallBacks structure when the binary heap was created.

## See Also

### CFBinaryHeap Miscellaneous Functions

- [CFBinaryHeapApplyFunction(_:_:_:)](corefoundation/cfbinaryheapapplyfunction(_:_:_:).md)
- [CFBinaryHeapContainsValue(_:_:)](corefoundation/cfbinaryheapcontainsvalue(_:_:).md)
- [CFBinaryHeapCreate(_:_:_:_:)](corefoundation/cfbinaryheapcreate(_:_:_:_:).md)
- [CFBinaryHeapCreateCopy(_:_:_:)](corefoundation/cfbinaryheapcreatecopy(_:_:_:).md)
- [CFBinaryHeapGetCount(_:)](corefoundation/cfbinaryheapgetcount(_:).md)
- [CFBinaryHeapGetCountOfValue(_:_:)](corefoundation/cfbinaryheapgetcountofvalue(_:_:).md)
- [CFBinaryHeapGetMinimum(_:)](corefoundation/cfbinaryheapgetminimum(_:).md)
- [CFBinaryHeapGetMinimumIfPresent(_:_:)](corefoundation/cfbinaryheapgetminimumifpresent(_:_:).md)
- [CFBinaryHeapGetTypeID()](corefoundation/cfbinaryheapgettypeid().md)
- [CFBinaryHeapGetValues(_:_:)](corefoundation/cfbinaryheapgetvalues(_:_:).md)
- [CFBinaryHeapRemoveAllValues(_:)](corefoundation/cfbinaryheapremoveallvalues(_:).md)
- [CFBinaryHeapRemoveMinimumValue(_:)](corefoundation/cfbinaryheapremoveminimumvalue(_:).md)
