This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Memory leaks in standard code


FX wrote:
 I realize, though, that
having memory leaks is rather hard in Fortran, because of the
automatic deallocation on procedure exit... so I'm asking a very naive
question: is it possible at all?

REAL, ALLOCATABLE :: A(:) DO WHILE(!condition) ! Do something ALLOCATE(A(50)) END DO END

generates a memory leak, unless ALLOCATE guards against this.

Cheers,
- Tobi

--
Tobias Schlüter
Am Coulombwall 1, Zi. 326
85748 Garching b. München
Tel.: +49/89/289-14139


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]