destroy Subroutine
private recursive subroutine destroy(this)
Arguments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector_ref), | intent(inout) | :: | this |
Source Code
recursive subroutine destroy(this)
type(vector_ref),intent(inout) :: this
if(allocated(this%items)) then
deallocate(this%items)
end if
if(this%verbose) then
print *, 'destroyed vector_ref (', this%current_size, ' elements)'
end if
this%current_size = 0
this%maximum_size = 0
end subroutine destroy