<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Unmanaged/passUnretained(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s9UnmanagedV14passUnretainedyAByxGxFZ"
  },
  "title" : "passUnretained(_:)"
}
-->

# passUnretained(_:)

Creates an unmanaged reference without performing an unbalanced
retain.

```
static func passUnretained(_ value: Instance) -> Unmanaged<Instance>
```

## Parameters

`value`

A class instance.

## Return Value

An unmanaged reference to the object passed as `value`.

## Discussion

This is useful when passing a reference to an API which Swift
does not know the ownership rules for, but you know that the
API expects you to pass the object at +0.

```
CFArraySetValueAtIndex(.passUnretained(array), i,
                       .passUnretained(object))
```

---

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)