Contents

moveElement(from:)

Retrieves and returns the element at index, leaving that element’s underlying memory uninitialized.

Declaration

func moveElement(from index: UnsafeMutableBufferPointer<Element>.Index) -> Element

Parameters

  • index:

    The index of the buffer element to retrieve and deinitialize.

Return Value

The instance referenced by this index in this buffer.

Discussion

The memory underlying the element at index must be initialized. After calling moveElement(from:), the memory underlying this element of the buffer is uninitialized, and still bound to type Element.