dbcsr_mempool_destruct Subroutine

public subroutine dbcsr_mempool_destruct(pool)

Finalizes mempool, includes deallocation of all contained data_areas.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mempool_type), POINTER :: pool

Source Code

   SUBROUTINE dbcsr_mempool_destruct(pool)
      !! Finalizes mempool, includes deallocation of all contained data_areas.
      TYPE(dbcsr_mempool_type), POINTER                  :: pool

      IF (.NOT. ASSOCIATED(pool)) DBCSR_ABORT("pool not allocated")

      CALL dbcsr_mempool_clear(pool)

!$    CALL OMP_DESTROY_LOCK(pool%lock)
      DEALLOCATE (pool%root)
      DEALLOCATE (pool)

   END SUBROUTINE dbcsr_mempool_destruct