initialize(from:count:)
Initializes the memory referenced by this pointer with the values starting at the given pointer.
Declaration
func initialize(from source: UnsafePointer<Pointee>, count: Int)Parameters
- source:
A pointer to the values to copy. The memory region
source..<(source + count)must be initialized. The memory regions referenced bysourceand this pointer must not overlap. - count:
The number of instances to move from
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 uninitialized or Pointee must be a trivial type. After calling initialize(from:count:), the region is initialized.