Function rmw_topic_endpoint_info_fini
Defined in File topic_endpoint_info.h
Function Documentation
-
rmw_ret_t rmw_topic_endpoint_info_fini(rmw_topic_endpoint_info_t *topic_endpoint_info, rcutils_allocator_t *allocator)
Finalize a topic endpoint info data structure.
Deallocates all allocated members of the given data structure, and then zero initializes it. If a logical error, such as
RMW_RET_INVALID_ARGUMENT, ensues, this function will return early, leaving the given data structure 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 the topic endpoint info data structure is not synchronized. It is not safe to read or write
topic_endpointduring finalization.The default allocators are thread-safe objects, but any custom
allocatormay not be. Check your allocator documentation for further reference.
- Parameters:
topic_endpoint_info – [inout] Data structure to be finalized.
allocator – [in] Allocator used to populate the given
topic_endpoint_info.
- Returns:
RMW_RET_OKif successful, or- Returns:
RMW_RET_INVALID_ARGUMENTiftopic_endpoint_infois NULL, or- Returns:
RMW_RET_INVALID_ARGUMENTifallocatoris invalid, by rcutils_allocator_is_valid() definition, or- Returns:
RMW_RET_ERRORwhen an unspecified error occurs.