destroy_da_long Subroutine

public subroutine destroy_da_long(me)

destruction of a dynamic array

this subroutine takes care of a proper destruction of a dynamic array, it frees the allocated memory and resets the internal counts to 0.

Arguments

Type IntentOptional Attributes Name
type(dyn_longarray_type), intent(inout) :: me

Called by

proc~~destroy_da_long~~CalledByGraph proc~destroy_da_long destroy_da_long interface~destroy~27 destroy interface~destroy~27->proc~destroy_da_long

Source Code

  subroutine destroy_da_long(me)
    type(dyn_longarray_type), intent(inout) :: me !< dynamic array to init

    me%containersize = 0
    me%nvals         = 0

    if( allocated( me%val ) ) deallocate(me%val)
    if( allocated( me%sorted ) ) deallocate(me%sorted)
  end subroutine destroy_da_long