---
title: "initialize(to:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/unsafemutablepointer/initialize(to:)"
---

# initialize(to:)

Initializes this pointer’s memory with a single instance of the given value.

## Declaration

```swift
func initialize(to value: consuming Pointee)
```

## Parameters

- `value`: The instance to initialize this pointer’s pointee to.

## Discussion

Discussion The destination memory must be uninitialized or the pointer’s Pointee must be a trivial type. After a call to initialize(to:), the memory referenced by this pointer is initialized. Calling this method is roughly equivalent to calling initialize(repeating:count:) with a count of 1.
