---
title: "update(from:count:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/unsafemutablepointer/update(from:count:)"
---

# update(from:count:)

Update this pointer’s initialized memory with the specified number of instances, copied from the given pointer’s memory.

## Declaration

```swift
func update(from source: UnsafePointer<Pointee>, count: Int)
```

## Parameters

- `source`: A pointer to at least count initialized instances of type Pointee. The memory regions referenced by source and this pointer may overlap.
- `count`: The number of instances to copy from the memory referenced by source to this pointer’s memory. count must not be negative.

## Discussion

Discussion The region of memory starting at this pointer and covering count instances of the pointer’s Pointee type must be initialized or Pointee must be a trivial type. After calling update(from:count:), the region is initialized. note: Returns without performing work if self and source are equal.
