---
title: "removeObject(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsobjectcontroller/removeobject(_:)"
---

# removeObject(_:)

Removes a given object from the receiver’s content.

## Declaration

```swift
func removeObject(_ object: Any)
```

## Parameters

- `object`: The object to remove from the receiver.

## Discussion

Discussion If object is the receiver’s content object, the receiver’s content is set to nil. If the receiver’s content is bound to another (primary) object or controller through a relationship key, the relationship of the primary object is cleared.

## See Also

### Managing objects

- [newObject()](appkit/nsobjectcontroller/newobject().md)
- [addObject(_:)](appkit/nsobjectcontroller/addobject(_:).md)
- [add(_:)](appkit/nsobjectcontroller/add(_:).md)
- [canAdd](appkit/nsobjectcontroller/canadd.md)
- [remove(_:)](appkit/nsobjectcontroller/remove(_:).md)
- [canRemove](appkit/nsobjectcontroller/canremove.md)
