Does the following code cause a memory leak?
type t_A; integer, allocatable :: i(:); end type t_A
type(t_A), allocatable :: A(:); integer :: i
allocate (A(10))
do i = 1, 10; call S(A(i)); end do
deallocate (A)
...
subroutine S(x); type(t_A) :: x; allocate (x%i(3)); end subroutine S
Or, does deallocating the outer array A automatically deallocate the embedded arrays?