<!--
{
  "availability" : [
    "iOS: 3.1.0 -",
    "iPadOS: 3.1.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/objc_removeAssociatedObjects(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:@F@objc_removeAssociatedObjects"
  },
  "title" : "objc_removeAssociatedObjects(_:)"
}
-->

# objc_removeAssociatedObjects(_:)

Removes all associations for a given object.

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

## Parameters

`object`

An object that maintains associated objects.

## 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(_:_:_:_:)`](/documentation/ObjectiveC/objc_setAssociatedObject(_:_:_:_:)) with a `nil` value to clear an association.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)