(j3.2006) deallocating pointer function results

Robert Corbett robert.corbett
Wed Nov 4 17:59:35 EST 2015


On 11/04/15 10:57, Van Snyder wrote:
>
> If the dummy argument cannot be deallocated, a memory leak might occur.
>
> It seems counterintuitive to require
>
>    p =>  f()
>    call sub ( p )
>
> just so that sub can deallocate the pointer when it's finished with it.

That was part of the argument made by the OP of the thread on 
comp.lang.fortran.  He also wanted

       deallocate( new_int() )

to be allowed for similar reasons.

Robert Corbett



More information about the J3 mailing list