The clear
subroutine deallocates the queue.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(priority_queue_t), | intent(inout) | :: | pq |
pure subroutine clear(pq) implicit none class(priority_queue_t), intent(inout) :: pq if (allocated(pq%heap)) deallocate(pq%heap) pq%number = 0 end subroutine clear