rNodeDestroy Subroutine

public subroutine rNodeDestroy(List)

Arguments

Type IntentOptional Attributes Name
type(rNode), pointer :: List

Called by

proc~~rnodedestroy~~CalledByGraph proc~rnodedestroy rNodeDestroy proc~esmf_cfiovarinfodestroy ESMF_CFIOVarInfoDestroy proc~esmf_cfiovarinfodestroy->proc~rnodedestroy proc~esmf_cfiodestroy ESMF_CFIODestroy proc~esmf_cfiodestroy->proc~esmf_cfiovarinfodestroy none~find~4 CFIOCollection%find none~find~4->proc~esmf_cfiodestroy proc~mapl_cfiodestroy MAPL_CFIODestroy proc~mapl_cfiodestroy->proc~esmf_cfiodestroy interface~esmf_iodestroy ESMF_ioDestroy interface~esmf_iodestroy->proc~mapl_cfiodestroy proc~mapl_cfiocreatefromfile MAPL_CFIOCreateFromFile proc~mapl_cfiocreatefromfile->none~find~4 proc~mapl_cfioreadbundleread MAPL_CFIOReadBundleRead proc~mapl_cfioreadbundleread->none~find~4

Source Code

   subroutine rNodeDestroy(List)
     type(rNode), pointer :: List, p, q

     if (.not. associated(List)) return
     q => List
     p => List%next
     do while ( associated(p) )  
        if (associated(q)) then
           if (associated(q%realData)) deallocate(q%realData)
           deallocate(q)
        end if
        q => p
        p => p%next
     end do

     if (associated(q)) then 
        if (associated(q%realData)) deallocate(q%realData)
        deallocate(q)
     end if

   end subroutine rNodeDestroy