Function rc_vector_free#
Defined in File vector.h
Function Documentation#
-
int rc_vector_free(rc_vector_t *v)#
Frees the memory allocated for vector v.
Also sets the length and initialized flag of the rc_vector_t struct to 0 to indicate to other functions that v no longer points to allocated memory and cannot be used until more memory is allocated such as with rc_vector_alloc or rc_vector_zeros. Returns 0 on success. Will only fail and return -1 if it is passed a NULL pointer.
- Parameters:
v – Pointer to user’s rc_vector_t struct
- Returns:
Returns 0 if successful, otherwise returns -1.