Initializer

init(bitPattern:)

Creates a new pointer from the given address, specified as a bit pattern.

Declaration

init?(bitPattern: Int)

Parameters

bitPattern

A bit pattern to use for the address of the new pointer. If bitPattern is zero, the result is nil.

Discussion

The address passed as bitPattern must have the correct alignment for the pointer’s Pointee type. That is, bitPattern % MemoryLayout<Pointee>.alignment must be 0.