<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMapTable/init(keyPointerFunctions:valuePointerFunctions:capacity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMapTable(im)initWithKeyPointerFunctions:valuePointerFunctions:capacity:"
  },
  "title" : "init(keyPointerFunctions:valuePointerFunctions:capacity:)"
}
-->

# init(keyPointerFunctions:valuePointerFunctions:capacity:)

Returns a map table, initialized with the given functions.

```
init(keyPointerFunctions keyFunctions: NSPointerFunctions, valuePointerFunctions valueFunctions: NSPointerFunctions, capacity initialCapacity: Int)
```

## Parameters

`keyFunctions`

The functions the map table uses to manage keys.

`valueFunctions`

The functions the map table uses to manage values.

`initialCapacity`

The initial capacity of the map table. This is just a hint; the map table may subsequently grow and shrink as required.

## Return Value

A map table, initialized with the given functions.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)