---
title: move()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/unsafemutablepointer/move()
---

# move()

Retrieves and returns the referenced instance, returning the pointer’s memory to an uninitialized state.

## Declaration

```swift
func move() -> Pointee
```

## Return Value

Return Value The instance referenced by this pointer.

## Discussion

Discussion Calling the move() method on a pointer p that references memory of type T is equivalent to the following code, aside from any cost and incidental side effects of copying and destroying the value: let value: T = {     defer { p.deinitialize(count: 1) }     return p.pointee }() The memory referenced by this pointer must be initialized. After calling move(), the memory is uninitialized.
