destroy the list (traverses from head to tail)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(list), | intent(inout) | :: | me |
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