---
title: "CFBinaryHeapGetValues(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbinaryheapgetvalues(_:_:)"
---

# CFBinaryHeapGetValues(_:_:)

Copies all the values from a binary heap into a sorted C array.

## Declaration

```swift
func CFBinaryHeapGetValues(_ heap: CFBinaryHeap!, _ values: UnsafeMutablePointer<UnsafeRawPointer?>!)
```

## Parameters

- `heap`: The binary heap to use.
- `values`: On return, the memory pointed to by this argument holds a C array of all the values in heap, sorted from minimum to maximum values. You must allocate sufficient memory to hold all the values in heap before calling this function. If the values are Core Foundation objects, ownership follows the https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1.

## See Also

### CFBinaryHeap Miscellaneous Functions

- [CFBinaryHeapAddValue(_:_:)](corefoundation/cfbinaryheapaddvalue(_:_:).md)
- [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)
- [CFBinaryHeapRemoveAllValues(_:)](corefoundation/cfbinaryheapremoveallvalues(_:).md)
- [CFBinaryHeapRemoveMinimumValue(_:)](corefoundation/cfbinaryheapremoveminimumvalue(_:).md)
