free Subroutine

private elemental subroutine free(self)

Arguments

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

XML file.

Description

Free dynamic memory.


Source Code

  elemental subroutine free(self)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Free dynamic memory.
  !---------------------------------------------------------------------------------------------------------------------------------
  class(xml_file), intent(inout) :: self !< XML file.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  if (allocated(self%tag)) then
    call self%tag%free
    deallocate(self%tag)
    self%Nt = 0
  endif
  !---------------------------------------------------------------------------------------------------------------------------------
  endsubroutine free