free_key Subroutine

public subroutine free_key(key)

Frees the memory in a key (Specifications)

Arguments: key - the key

Arguments

Type IntentOptional Attributes Name
type(key_type), intent(inout) :: key

Source Code

    subroutine free_key( key )
!! Version: Experimental
!!
!! Frees the memory in a key
!! ([Specifications](../page/specs/stdlib_hashmaps.html#free_key-frees-the-memory-associated-with-a-key))
!!
!! Arguments:
!!     key  - the key
        type(key_type), intent(inout) :: key

        if ( allocated( key % value ) ) deallocate( key % value )

    end subroutine free_key