---
title: "init(pointerFunctions:capacity:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nshashtable/init(pointerfunctions:capacity:)"
---

# init(pointerFunctions:capacity:)

Returns a hash table initialized with the given functions and capacity.

## Declaration

```swift
init(pointerFunctions functions: NSPointerFunctions, capacity initialCapacity: Int)
```

## Parameters

- `functions`: The pointer functions for the new hash table.
- `initialCapacity`: The initial capacity of the hash table.

## Return Value

Return Value A hash table initialized with the given functions and capacity.

## Discussion

Discussion Hash tables allocate additional memory as needed, so initialCapacity simply establishes the object’s initial capacity.

## See Also

### Initialization

- [init(options:capacity:)](foundation/nshashtable/init(options:capacity:).md)
