Skip to content

Commit

Permalink
Clarify rmw_destroy_node() side effects.
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic committed Jul 14, 2020
1 parent cd485f4 commit d9930ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ rmw_create_node(

/// Finalize a given node handle, reclaim the resources, and deallocate the node handle.
/**
* This function will return early if a logical error, such as `RMW_RET_INVALID_ARGUMENT`
* or `RMW_RET_INCORRECT_RMW_IMPLEMENTATION`, ensues, leaving the given node handle unchanged.
* Otherwise, it will proceed despite errors, freeing as much resources as it can, including
* the node handle. Usage of a deallocated node handle is undefined behavior.
*
* \pre All publishers, subscribers, services, and clients created from this node must
* have been destroyed prior to this call. Some rmw implementations may verify this,
* returning `RMW_RET_ERROR` and setting a human readable error message if any entity
Expand Down

0 comments on commit d9930ed

Please sign in to comment.