<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/UnsafeMutablePointer/update(from:count:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sp6update4from5countySPyxG_SitF"
  },
  "title" : "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.

```
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

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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)