automaton__deallocate Subroutine

private pure subroutine automaton__deallocate(self)

Type Bound

automaton_t

Arguments

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

Source Code

   pure subroutine automaton__deallocate(self)
      implicit none
      class(automaton_t), intent(inout) :: self

      call self%dfa%free()
      call self%nfa%free()

      if (allocated(self%dfa%nodes)) deallocate(self%dfa%nodes)
      if (allocated(self%nfa%nodes)) deallocate(self%nfa%nodes)
      if (allocated(self%all_segments)) deallocate(self%all_segments)

   end subroutine automaton__deallocate