<!--
{
  "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/passRetained(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s9UnmanagedV12passRetainedyAByxGxFZ"
  },
  "title" : "passRetained(_:)"
}
-->

# passRetained(_:)

Creates an unmanaged reference with an unbalanced retain.

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

## Parameters

`value`

A class instance.

## Return Value

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

## Discussion

The instance passed as `value` will leak if nothing eventually balances
the retain.

This is useful when passing an object 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 +1.

---

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)