---
title: "objc_removeAssociatedObjects(_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 3.1+, iPadOS 3.1+, Mac Catalyst 13.1+, macOS 10.6+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/objc_removeassociatedobjects(_:)"
---

# objc_removeAssociatedObjects(_:)

Removes all associations for a given object.

## Declaration

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

## Parameters

- `object`: An object that maintains associated objects.

## Discussion

Discussion The main purpose of this function is to make it easy to return an object to a “pristine state”. You should not use this function for general removal of associations from objects, since it also removes associations that other clients may have added to the object. Typically you should use objc_setAssociatedObject(_:_:_:_:) with a nil value to clear an association.

## See Also

### Associative References

- [objc_setAssociatedObject(_:_:_:_:)](objectivec/objc_setassociatedobject(_:_:_:_:).md)
- [objc_getAssociatedObject(_:_:)](objectivec/objc_getassociatedobject(_:_:).md)
