Free dynamic memory.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(command_line_argument), | intent(inout) | :: | self |
CLA data. |
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