---
title: removeObject
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osdictionary/removeobject-156jh
---

# removeObject

Remove an object by key from the dictionary.

## Declaration

```occ
void removeObject(const char *aKey);
```

## Parameters

- `aKey`: A c-string key. An OSString is created from aKey and used as the key for the dictionary.

## Discussion

Discussion An object in the dictionary with the given key object is removed and released.

## See Also

### Accessing Keys and Values

- [getObject](driverkit/osdictionary/getobject-9ikoz.md)
- [getObject](driverkit/osdictionary/getobject-8k3ie.md)
- [setObject](driverkit/osdictionary/setobject-9b4z0.md)
- [setObject](driverkit/osdictionary/setobject-7q0u2.md)
- [removeObject](driverkit/osdictionary/removeobject-25qm5.md)
- [iterateObjects](driverkit/osdictionary/iterateobjects-9h89s.md)
- [iterateObjects](driverkit/osdictionary/iterateobjects-6cv0d.md)
- [OSDictionaryIterateObjectsBlock](driverkit/osdictionaryiterateobjectsblock.md)
- [OSDictionaryIterateObjectsCallback](driverkit/osdictionaryiterateobjectscallback.md)
