update(from:count:)
Update this pointer’s initialized memory with the specified number of instances, copied from the given pointer’s memory.
Declaration
func update(from source: UnsafePointer<Pointee>, count: Int)Parameters
- source:
A pointer to at least
countinitialized instances of typePointee. The memory regions referenced bysourceand this pointer may overlap. - count:
The number of instances to copy from the memory referenced by
sourceto this pointer’s memory.countmust 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.