free Subroutine

private elemental subroutine free(self)

Free dynamic memory.

Type Bound

command_line_interface

Arguments

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

CLI data.


Calls

proc~~free~3~~CallsGraph proc~free~3 flap_command_line_interface_t::command_line_interface%free proc~free_object flap_object_t::object%free_object proc~free~3->proc~free_object

Source Code

  elemental subroutine free(self)
  !< Free dynamic memory.
  class(command_line_interface), intent(inout) :: self !< CLI data.
  integer(I4P)                                 :: g    !< Counter.

  ! object members
  call self%free_object
  ! command_line_interface members
  if (allocated(self%clasg)) then
    do g=0, size(self%clasg,dim=1) - 1
      call self%clasg(g)%free
    enddo
    deallocate(self%clasg)
  endif
  if (allocated(self%args)) deallocate(self%args)
  if (allocated(self%examples)) deallocate(self%examples)
  self%disable_hv          = .false.
  self%is_parsed_          = .false.
  self%ignore_unknown_clas = .false.
  self%error_unknown_clas  = 0_I4P
  endsubroutine free