Release the heap storage and reset it to empty.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(heap_t), | intent(inout) | :: | self |
subroutine heap_destroy(self) !! Release the heap storage and reset it to empty. class(heap_t), intent(inout) :: self if (allocated(self%keys)) deallocate (self%keys) if (allocated(self%payloads)) deallocate (self%payloads) if (allocated(self%insertion)) deallocate (self%insertion) self%n_entries = 0 self%n_pushed = 0_int64 end subroutine heap_destroy