Function rcutils_string_array_fini

Function Documentation

rcutils_ret_t rcutils_string_array_fini(rcutils_string_array_t *string_array)

Finalize a string array, reclaiming all resources.

This function reclaims any memory owned by the string array, including the strings it references.

The allocator used to initialize the string array is used to deallocate each string in the array and the array of strings itself.

Parameters:

string_array[inout] object to be finalized

Returns:

RCUTILS_RET_OK if successful, or

Returns:

RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or

Returns:

RCUTILS_RET_ERROR if an unknown error occurs.