destroy_list Subroutine

private impure elemental subroutine destroy_list(me)

destroy the list (traverses from head to tail)

Type Bound

list

Arguments

Type IntentOptional Attributes Name
class(list), intent(inout) :: me

Calls

proc~~destroy_list~~CallsGraph proc~destroy_list list%destroy_list proc~destroy_node destroy_node proc~destroy_list->proc~destroy_node proc~destroy_node->proc~destroy_node proc~destroy_node_data node%destroy_node_data proc~destroy_node->proc~destroy_node_data

Called by

proc~~destroy_list~~CalledByGraph proc~destroy_list list%destroy_list proc~list_finalizer list_finalizer proc~list_finalizer->proc~destroy_list

Source Code

    impure elemental subroutine destroy_list(me)

    implicit none

    class(list),intent(inout) :: me

    me%count = 0

    if (associated(me%head)) call destroy_node(me%head)

    nullify(me%head)
    nullify(me%tail)

    end subroutine destroy_list