dbcsr_image_dist_release Subroutine

public subroutine dbcsr_image_dist_release(imgdist)

Releases a reference to and possible deallocates an image distribution

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_imagedistribution_obj), intent(inout) :: imgdist

Contents


Source Code

   SUBROUTINE dbcsr_image_dist_release(imgdist)
      !! Releases a reference to and possible deallocates an image
      !! distribution

      TYPE(dbcsr_imagedistribution_obj), INTENT(INOUT)   :: imgdist

      IF (ASSOCIATED(imgdist%i)) THEN
         imgdist%i%refcount = imgdist%i%refcount - 1
         IF (imgdist%i%refcount .EQ. 0) THEN
            CALL dbcsr_destroy_image_dist(imgdist%i)
            DEALLOCATE (imgdist%i)
         END IF
      END IF
   END SUBROUTINE dbcsr_image_dist_release