Gambas Documentation - /dev/api/name/gb.freearray

/dev/api/name/gb.freearray

# GB.FreeArray

void GB.FreeArray ( void *parray )

Deletes a memory array.

- parray must be a pointer to a variable that points at the array. It is not a real `void *` pointer, but a `TYPE **` pointer casted to `void *`, `TYPE` being the type of the data that will be stored in the array.

### Examples

    /* Creates and delete an array of integers with n slots */

    int *array;

    GB.NewArray((void *)&array, sizeof(*array), n);
    ...
    GB.FreeArray((void *)&array);

### See also

- /wiki/api/cat/marray