---
title: takeUnretainedValue()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/unmanaged/takeunretainedvalue()
---

# takeUnretainedValue()

Gets the value of this unmanaged reference as a managed reference without consuming an unbalanced retain of it.

## Declaration

```swift
func takeUnretainedValue() -> Instance
```

## Return Value

Return Value The object referenced by this Unmanaged instance.

## Discussion

Discussion This is useful when a function returns an unmanaged reference and you know that you’re not responsible for releasing the result.
