free Subroutine

private elemental subroutine free(self)

Free dynamic memory.

Type Bound

command_line_argument

Arguments

Type IntentOptional Attributes Name
class(command_line_argument), intent(inout) :: self

CLA data.


Calls

proc~~free~2~~CallsGraph proc~free~2 flap_command_line_argument_t::command_line_argument%free proc~free_object flap_object_t::object%free_object proc~free~2->proc~free_object

Source Code

  elemental subroutine free(self)
  !< Free dynamic memory.
  class(command_line_argument), intent(inout) :: self  !< CLA data.

  ! object members
  call self%free_object
  ! other members
  if (allocated(self%switch   )) deallocate(self%switch   )
  if (allocated(self%switch_ab)) deallocate(self%switch_ab)
  if (allocated(self%act      )) deallocate(self%act      )
  if (allocated(self%def      )) deallocate(self%def      )
  if (allocated(self%nargs    )) deallocate(self%nargs    )
  if (allocated(self%choices  )) deallocate(self%choices  )
  if (allocated(self%val      )) deallocate(self%val      )
  if (allocated(self%envvar   )) deallocate(self%envvar   )
  self%is_required     = .false.
  self%is_positional   = .false.
  self%position        = 0_I4P
  self%is_passed       = .false.
  self%is_hidden       = .false.
  self%is_val_required = .true.
  endsubroutine free