---
title: "NSCopyMapTableWithZone(_:_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nscopymaptablewithzone(_:_:)"
---

# NSCopyMapTableWithZone(_:_:)

Performs a shallow copy of the specified map table.

## Declaration

```swift
func NSCopyMapTableWithZone(_ table: NSMapTable<AnyObject, AnyObject>, _ zone: NSZone?) -> NSMapTable<AnyObject, AnyObject>
```

## Return Value

Return Value A pointer to a new copy of table, created in zone and containing pointers to the keys and values of table.

## Discussion

Discussion If zone is NULL, the new table is created in the default zone. The new table adopts the callback functions of table and calls the hash and retain callback functions as appropriate when inserting elements into the new table.

## See Also

### Related Documentation

- [NSCreateMapTableWithZone(_:_:_:_:)](foundation/nscreatemaptablewithzone(_:_:_:_:).md)
- [NSCreateMapTable(_:_:_:)](foundation/nscreatemaptable(_:_:_:).md)
- [NSMapTableValueCallBacks](foundation/nsmaptablevaluecallbacks.md)
- [NSMapTableKeyCallBacks](foundation/nsmaptablekeycallbacks.md)

### Functions

- [NSAllMapTableKeys(_:)](foundation/nsallmaptablekeys(_:).md)
- [NSAllMapTableValues(_:)](foundation/nsallmaptablevalues(_:).md)
- [NSCompareMapTables(_:_:)](foundation/nscomparemaptables(_:_:).md)
- [NSCountMapTable(_:)](foundation/nscountmaptable(_:).md)
- [NSCreateMapTable(_:_:_:)](foundation/nscreatemaptable(_:_:_:).md)
- [NSCreateMapTableWithZone(_:_:_:_:)](foundation/nscreatemaptablewithzone(_:_:_:_:).md)
- [NSEndMapTableEnumeration(_:)](foundation/nsendmaptableenumeration(_:).md)
- [NSEnumerateMapTable(_:)](foundation/nsenumeratemaptable(_:).md)
- [NSFreeMapTable(_:)](foundation/nsfreemaptable(_:).md)
- [NSMapGet(_:_:)](foundation/nsmapget(_:_:).md)
- [NSMapInsert(_:_:_:)](foundation/nsmapinsert(_:_:_:).md)
- [NSMapInsertIfAbsent(_:_:_:)](foundation/nsmapinsertifabsent(_:_:_:).md)
- [NSMapInsertKnownAbsent(_:_:_:)](foundation/nsmapinsertknownabsent(_:_:_:).md)
- [NSMapMember(_:_:_:_:)](foundation/nsmapmember(_:_:_:_:).md)
- [NSMapRemove(_:_:)](foundation/nsmapremove(_:_:).md)
