heap_destroy Subroutine

private subroutine heap_destroy(self)

Release the heap storage and reset it to empty.

Type Bound

heap_t

Arguments

Type IntentOptional Attributes Name
class(heap_t), intent(inout) :: self

Called by

proc~~heap_destroy~~CalledByGraph proc~heap_destroy heap_t%heap_destroy proc~a_star a_star proc~a_star->proc~heap_destroy proc~dijkstra dijkstra proc~dijkstra->proc~heap_destroy

Source Code

   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