initialize(repeating:count:)
Initializes this pointer’s memory with the specified number of consecutive copies of the given value.
Declaration
func initialize(repeating repeatedValue: Pointee, count: Int)Parameters
- repeatedValue:
The instance to initialize this pointer’s memory with.
- count:
The number of consecutive copies of
newValueto initialize.countmust not be negative.
Discussion
The destination memory must be uninitialized or the pointer’s Pointee must be a trivial type. After a call to initialize(repeating:count:), the memory referenced by this pointer is initialized.