free Subroutine

private elemental subroutine free(self)

Arguments

Type IntentOptional AttributesName
class(string), intent(inout) :: self

The string.

Description

Free dynamic memory.


Source Code

  elemental subroutine free(self)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Free dynamic memory.
  !---------------------------------------------------------------------------------------------------------------------------------
  class(string), intent(inout) :: self !< The string.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  if (allocated(self%raw)) deallocate(self%raw)
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endsubroutine free