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: valgrind reports "definitely lost" memory for very simple codes


> On May 7, 2015, at 10:57 PM, Tobias Burnus <burnus@net-b.de> wrote:
> 
> If you want the compiler to automatically deallocate those variables, put your main program into a BLOCK, e.g.:
> 
> program main
>  BLOCK
>    real, allocatable :: x
>    x=0.
>  END BLOCK
> end program main
> 

Thanks for reminding me of this, Tobias.  It fixes all the cases I reported.  I believe I’ll have some more complicated cases to report that actually are memory leaks within a day or two.

Damian


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