FREE (The GNU Fortran Compiler)

### 8.123 `FREE` — Frees memory ¶

Synopsis:

  `CALL FREE(PTR)`

Description:

  Frees memory previously allocated by `MALLOC`. The `FREE` intrinsic is an extension intended to be used with Cray pointers, and is provided in GNU Fortran to allow user to compile legacy code. For new code using Fortran 95 pointers, the memory de-allocation intrinsic is `DEALLOCATE`.

Class:

  Subroutine

Arguments:

  PTR | The type shall be `INTEGER`. It represents the location of the memory that should be de-allocated.

Return value:

  None

Example:

  See `MALLOC` for an example.

Standard:

  GNU extension

See also:

  `MALLOC` — Allocate dynamic memory