---
title: "pointer(at:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nspointerarray/pointer(at:)"
---

# pointer(at:)

Returns the pointer at a given index.

## Declaration

```swift
func pointer(at index: Int) -> UnsafeMutableRawPointer?
```

## Parameters

- `index`: The index of an element in the receiver. This value must be less than the doc://com.apple.foundation/documentation/Foundation/NSPointerArray/count of the receiver.

## Return Value

Return Value The pointer at index.

## Discussion

Discussion The returned value may be NULL.

## See Also

### Managing the Collection

- [count](foundation/nspointerarray/count.md)
- [allObjects](foundation/nspointerarray/allobjects.md)
- [addPointer(_:)](foundation/nspointerarray/addpointer(_:).md)
- [removePointer(at:)](foundation/nspointerarray/removepointer(at:).md)
- [insertPointer(_:at:)](foundation/nspointerarray/insertpointer(_:at:).md)
- [replacePointer(at:withPointer:)](foundation/nspointerarray/replacepointer(at:withpointer:).md)
- [compact()](foundation/nspointerarray/compact().md)
