---
title: "CFTreeGetChildren(_:_:)"
framework: Core Foundation
role: symbol
role_heading: Function
path: "corefoundation/cftreegetchildren(_:_:)"
---

# CFTreeGetChildren(_:_:)

Fills a buffer with children from the tree.

## Declaration

```swift
func CFTreeGetChildren(_ tree: CFTree!, _ children: UnsafeMutablePointer<Unmanaged<CFTree>?>!)
```

## Parameters

- `tree`: The tree to examine.
- `children`: The C array of pointer-sized values to be filled with the children from tree. This value must be a valid pointer to a C array of at least the size of the number of children in tree. Use the doc://com.apple.corefoundation/documentation/CoreFoundation/CFTreeGetChildCount(_:) function to obtain the number of children in tree. You are responsible for retaining and releasing the returned objects as needed.

## See Also

### Examining a Tree

- [CFTreeFindRoot(_:)](corefoundation/cftreefindroot(_:).md)
- [CFTreeGetChildAtIndex(_:_:)](corefoundation/cftreegetchildatindex(_:_:).md)
- [CFTreeGetChildCount(_:)](corefoundation/cftreegetchildcount(_:).md)
- [CFTreeGetContext(_:_:)](corefoundation/cftreegetcontext(_:_:).md)
- [CFTreeGetFirstChild(_:)](corefoundation/cftreegetfirstchild(_:).md)
- [CFTreeGetNextSibling(_:)](corefoundation/cftreegetnextsibling(_:).md)
- [CFTreeGetParent(_:)](corefoundation/cftreegetparent(_:).md)
