Skip to main content

function

destroy_pointee

destroy_pointee(ptr: UnsafePointer[T, 0])

Destroy the pointed-to value.

The pointer must not be null, and the pointer memory location is assumed to contain a valid initialized instance of T. This is equivalent to _ = move_from_pointee(ptr) but doesn't require Movable and is more efficient becase it doesn't invoke __moveinit__.

Args:

  • ptr (UnsafePointer[T, 0]): The pointer whose pointee this destroys.