Destroy complete list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_intList), | intent(inout), | pointer | :: | ElemList |
linked list of resulting elements building the neighbor |
pure subroutine tem_destroyIntList(ElemList) ! --------------------------------------------------------------------------- !> linked list of resulting elements building the neighbor type(tem_intList),pointer, intent(inout) :: ElemList ! --------------------------------------------------------------------------- type(tem_intList),pointer :: firstPos ! first entry in linked list type(tem_intList),pointer :: currPos ! current position in linked list type(tem_intList),pointer :: lastPos ! one before current position ! --------------------------------------------------------------------------- firstPos => ElemList currPos => ElemList ! Iterate as long as there are entries do while(associated(currPos%next)) lastPos => currPos currPos => currPos%next deallocate(lastPos) enddo end subroutine tem_destroyIntList