Free array map (nullify pointers and deallocate array)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(array_ptr), | allocatable | :: | map(:) |
subroutine map_free(map) !! Free array map (nullify pointers and deallocate array) implicit none type(array_ptr), allocatable :: map(:) integer :: i if(allocated(map))then do i = 1, size(map) if(associated(map(i)%p))then nullify(map(i)%p) end if end do deallocate(map) end if end subroutine map_free