Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_HConfig), | intent(inout) | :: | hconfig | |||
type(ESMF_KeywordEnforcer), | optional | :: | keywordEnforcer | |||
integer, | intent(out), | optional | :: | rc |
subroutine ESMF_HConfigDestroy(hconfig, keywordEnforcer, rc) ! ! !ARGUMENTS: type(ESMF_HConfig), intent(inout) :: hconfig type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below integer, intent(out), optional :: rc ! !DESCRIPTION: ! Destroys an {\tt ESMF\_HConfig}, releasing the resources associated ! with the object. ! ! By default a small remnant of the object is kept in memory in order to ! prevent problems with dangling aliases. The default garbage collection ! mechanism can be overridden with the {\tt noGarbage} argument. ! ! The arguments are: ! \begin{description} ! \item[hconfig] ! {\tt ESMF\_HConfig} object to be destroyed. ! \item[{[rc]}] ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors. ! \end{description} ! !EOP !------------------------------------------------------------------------------ integer :: localrc ! local return code ! initialize return code; assume routine not implemented localrc = ESMF_RC_NOT_IMPL if (present(rc)) rc = ESMF_RC_NOT_IMPL ! Check init status of arguments ESMF_INIT_CHECK_DEEP(ESMF_HConfigGetInit, hconfig, rc) ! Call into the C++ interface, which will sort out optional arguments. call c_ESMC_HConfigDestroy(hconfig, localrc) if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & ESMF_CONTEXT, rcToReturn=rc)) return ! Mark this HConfig as invalid hconfig%shallowMemory = 0 ! Set init code ESMF_INIT_SET_DELETED(hconfig) ! return successfully if (present(rc)) rc = ESMF_SUCCESS end subroutine ESMF_HConfigDestroy