Subroutine to destroy array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(pf_encap_t), | intent(inout) | :: | encap |
subroutine ndarray_oc_destroy(encap)
class(pf_encap_t), intent(inout) :: encap
type(ndarray_oc), pointer :: ndarray_oc_obj
ndarray_oc_obj => cast_as_ndarray_oc(encap) !??
deallocate(ndarray_oc_obj%pflatarray)
deallocate(ndarray_oc_obj%yflatarray)
deallocate(ndarray_oc_obj%shape)
nullify(ndarray_oc_obj)
end subroutine ndarray_oc_destroy