Contents

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