dealloc_rdm_list_t Subroutine

public subroutine dealloc_rdm_list_t(rdm)

Uses

Arguments

Type IntentOptional Attributes Name
type(rdm_list_t), intent(inout) :: rdm

Contents

Source Code


Source Code

    subroutine dealloc_rdm_list_t(rdm)

        ! Deallocate an rdm_list_t object.

        ! In/Out: rdm - rdm_list_t object to be deallocated.

        use hash, only: clear_hash_table

        type(rdm_list_t), intent(inout) :: rdm

        integer :: ierr

        if (allocated(rdm%elements)) deallocate(rdm%elements, stat=ierr)

        call clear_hash_table(rdm%hash_table)
        deallocate(rdm%hash_table, stat=ierr)
        nullify (rdm%hash_table)

    end subroutine dealloc_rdm_list_t