---
title: removeAllObjects()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsmutabledictionary/removeallobjects()
---

# removeAllObjects()

Empties the dictionary of its entries.

## Declaration

```swift
func removeAllObjects()
```

## Discussion

Discussion Each key and corresponding value object is sent a release message.

## See Also

### Removing Entries From a Mutable Dictionary

- [removeObject(forKey:)](foundation/nsmutabledictionary/removeobject(forkey:).md)
- [removeObjects(forKeys:)](foundation/nsmutabledictionary/removeobjects(forkeys:).md)
