Function rmw_names_and_types_fini

Function Documentation

rmw_ret_t rmw_names_and_types_fini(rmw_names_and_types_t *names_and_types)

Finalize an array of names and types.

This function deallocates the string array of names and the array of string arrays of types, and zero initializes the given array. If a logical error, such as RMW_RET_INVALID_ARGUMENT, ensues, this function will return early, leaving the given array unchanged. Otherwise, it will proceed despite errors.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Remark

This function sets the RMW error state on failure.

Thread-safety

Finalization is a reentrant procedure, but access to arrays of names and types is not synchronized. It is not safe to read or write names_and_types during initialization.

Parameters:

names_and_types[inout] Array to be finalized.

Returns:

RMW_RET_OK if successful, or

Returns:

RMW_RET_INVALID_ARGUMENT if names_and_types is NULL, or

Returns:

RMW_RET_ERROR when an unspecified error occurs.