hash_map_destroy Subroutine

private subroutine hash_map_destroy(this)

Release every buffer and return the map to the unallocated state.

Type Bound

hash_map_t

Arguments

Type IntentOptional Attributes Name
class(hash_map_t), intent(inout) :: this

Called by

proc~~hash_map_destroy~~CalledByGraph proc~hash_map_destroy hash_map_t%hash_map_destroy proc~hash_map_init hash_map_t%hash_map_init proc~hash_map_init->proc~hash_map_destroy proc~hash_map_insert hash_map_t%hash_map_insert proc~hash_map_insert->proc~hash_map_init

Source Code

   subroutine hash_map_destroy(this)
      !! Release every buffer and return the map to the unallocated state.
      class(hash_map_t), intent(inout) :: this

      if (allocated(this%buckets)) deallocate (this%buckets)
      if (allocated(this%key_start)) deallocate (this%key_start)
      if (allocated(this%key_size)) deallocate (this%key_size)
      if (allocated(this%entry_value)) deallocate (this%entry_value)
      if (allocated(this%key_pool)) deallocate (this%key_pool)
      this%n_buckets = 0
      this%n_entries = 0
      this%entry_cap = 0
      this%pool_used = 0
      this%pool_cap = 0
   end subroutine hash_map_destroy