call the destructor on all elements of an array, then deallocate it. This is for intrinsic arrays, the sampler array class has its own deallocate routine. @param[in, out] arr array to deallocate
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(AliasSampler_t), | intent(inout), | allocatable | :: | arr(:) |
subroutine clear_sampler_array(arr)
type(AliasSampler_t), allocatable, intent(inout) :: arr(:)
integer :: i
do i = 1, size(arr)
call arr(i)%finalize()
end do
deallocate(arr)
end subroutine clear_sampler_array