free_object Subroutine

private elemental subroutine free_object(self)

Free dynamic memory.

Type Bound

object

Arguments

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

Object data.


Called by

proc~~free_object~~CalledByGraph proc~free_object flap_object_t::object%free_object proc~free flap_command_line_arguments_group_t::command_line_arguments_group%free proc~free->proc~free_object proc~free~2 flap_command_line_argument_t::command_line_argument%free proc~free~2->proc~free_object proc~free~3 flap_command_line_interface_t::command_line_interface%free proc~free~3->proc~free_object

Source Code

  elemental subroutine free_object(self)
  !< Free dynamic memory.
  class(object), intent(inout) :: self !< Object data.

  if (allocated(self%progname     )) deallocate(self%progname     )
  if (allocated(self%version      )) deallocate(self%version      )
  if (allocated(self%help         )) deallocate(self%help         )
  if (allocated(self%help_color  ))  deallocate(self%help_color   )
  if (allocated(self%help_style  ))  deallocate(self%help_style   )
  if (allocated(self%help_markdown)) deallocate(self%help_markdown)
  if (allocated(self%description  )) deallocate(self%description  )
  if (allocated(self%license      )) deallocate(self%license      )
  if (allocated(self%authors      )) deallocate(self%authors      )
  if (allocated(self%epilog       )) deallocate(self%epilog       )
  if (allocated(self%m_exclude    )) deallocate(self%m_exclude    )
  if (allocated(self%error_message)) deallocate(self%error_message)
  if (allocated(self%error_color  )) deallocate(self%error_color  )
  if (allocated(self%error_style  )) deallocate(self%error_style  )
  self%error = 0_I4P
  self%usage_lun = stderr
  self%version_lun = stdout
  self%error_lun = stderr
  endsubroutine free_object