Function rc_matrix_free#

Function Documentation#

int rc_matrix_free(rc_matrix_t *A)#

Frees the memory allocated for a matrix A.

Also sets the dimensions and initialized flag to 0 to indicate to other functions that A no longer points to allocated memory and cannot be used until more memory is allocated such as with rc_matrix_alloc or rc_matrix_zeros. Will only fail and return -1 if it is passed a NULL pointer.

Parameters:

A – Pointer to user’s matrix struct

Returns:

0 on success, -1 on failure.