---
title: AutoreleasingUnsafeMutablePointer
framework: swift
role: symbol
role_heading: Structure
path: swift/autoreleasingunsafemutablepointer
---

# AutoreleasingUnsafeMutablePointer

A mutable pointer addressing an Objective-C reference that doesn’t own its target.

## Declaration

```swift
@frozen struct AutoreleasingUnsafeMutablePointer<Pointee>
```

## Mentioned in

Using Imported C Functions in Swift

## Overview

Overview Pointee must be a class type or Optional<C> where C is a class. This type has implicit conversions to allow passing any of the following to a C or ObjC API: nil, which gets passed as a null pointer, an inout argument of the referenced type, which gets passed as a pointer to a writeback temporary with autoreleasing ownership semantics, an UnsafeMutablePointer<Pointee>, which is passed as-is. Passing pointers to mutable arrays of ObjC class pointers is not directly supported. Unlike UnsafeMutablePointer<Pointee>, AutoreleasingUnsafeMutablePointer<Pointee> must reference storage that does not own a reference count to the referenced value. UnsafeMutablePointer’s operations, by contrast, assume that the referenced storage owns values loaded from or stored to it. This type does not carry an owner pointer unlike the other C*Pointer types because it only needs to reference the results of inout conversions, which already have writeback-scoped lifetime.

## Topics

### Converting Pointers

- [init(_:)](swift/autoreleasingunsafemutablepointer/init(_:)-7rndr.md)
- [init(_:)](swift/autoreleasingunsafemutablepointer/init(_:)-4mrz1.md)

### Accessing a Pointer’s Memory

- [pointee](swift/autoreleasingunsafemutablepointer/pointee.md)
- [subscript(_:)](swift/autoreleasingunsafemutablepointer/subscript(_:).md)

### Comparing Pointers

- [==(_:_:)](swift/autoreleasingunsafemutablepointer/==(_:_:)-4wfti.md)

### Instance Properties

- [hashValue](swift/autoreleasingunsafemutablepointer/hashvalue.md)

### Type Aliases

- [AutoreleasingUnsafeMutablePointer.Stride](swift/autoreleasingunsafemutablepointer/stride.md)

### Default Implementations

- [Comparable Implementations](swift/autoreleasingunsafemutablepointer/comparable-implementations.md)
- [CustomReflectable Implementations](swift/autoreleasingunsafemutablepointer/customreflectable-implementations.md)
- [Equatable Implementations](swift/autoreleasingunsafemutablepointer/equatable-implementations.md)
- [Hashable Implementations](swift/autoreleasingunsafemutablepointer/hashable-implementations.md)
- [Strideable Implementations](swift/autoreleasingunsafemutablepointer/strideable-implementations.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [CVarArg](swift/cvararg.md)
- [Comparable](swift/comparable.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomReflectable](swift/customreflectable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Strideable](swift/strideable.md)

## See Also

### C and Objective-C Pointers

- [OpaquePointer](swift/opaquepointer.md)
