Fortran Library Reference

free: Deallocate Memory Allocated by Malloc

The subroutine is called by:

call free ( ptr )

ptr

pointer

Input  

free deallocates a region of memory previously allocated by malloc. The region of memory is returned to the memory manager; it is no longer available to the user's program.

Example: free():


    real x
    pointer ( ptr, x ) 
    ptr = malloc ( 10000 )
    call free ( ptr )
    end

See "malloc, malloc64: Allocate Memory and Get Address" for details.