Memory leaks in standard code

FX fxcoudert@gmail.com
Fri Feb 15 13:28:00 GMT 2008


>  REAL, ALLOCATABLE :: A(:)
>  DO WHILE(!condition)
>    ! Do something
>    ALLOCATE(A(50))
>  END DO
>  END
>
>  generates a memory leak, unless ALLOCATE guards against this.

Yeah, I should have said something about this... we already detect two
cases: ALLOCATE(already_allocated_array) and
DEALLOCATE(non_allocated_array). Are there any more?

Thanks,
FX

-- 
FX Coudert
http://www.homepages.ucl.ac.uk/~uccafco/



More information about the Fortran mailing list