---
title: "mutableCopy(with:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmutablecopying/mutablecopy(with:)"
---

# mutableCopy(with:)

Returns a new instance that’s a mutable copy of the receiver.

## Declaration

```swift
func mutableCopy(with zone: NSZone? = nil) -> Any
```

## Parameters

- `zone`: This parameter is ignored. Memory zones are no longer used by Objective-C.

## Discussion

Discussion The returned object is implicitly retained by the sender, which is responsible for releasing it. The copy returned is mutable whether the original is mutable or not.

## See Also

### Related Documentation

- [copy(with:)](foundation/nscopying/copy(with:).md)
- [Advanced Memory Management Programming Guide](apple-archive/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemoryMgmt.html.md)
- [mutableCopy()](objectivec/nsobject-swift.class/mutablecopy().md)
