Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions rclcpp/include/rclcpp/publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,17 @@ class Publisher : public PublisherBase
>::make_shared(size, this->get_allocator());
}

/// Loan memory for a ROS message from the middleware
/// Loan memory for a ROS message from the middleware.
/**
* If the middleware is capable of loaning memory for a ROS message instance,
* the loaned message will be directly allocated in the middleware.
* If not, the message allocator of this rclcpp::Publisher instance is being used.
*
* With a call to \sa `publish` the LoanedMessage instance is being returned to the middleware
* or free'd accordingly to the allocator.
* If the message is not being published but processed differently, the message has to be
* returned by calling \sa `return_loaned_message`.
* If the message is not being published but processed differently, the destructor of this
* class will either return the message to the middleware or deallocate it via the internal
* allocator.
* \sa rclcpp::LoanedMessage for details of the LoanedMessage class.
*
* \return LoanedMessage containing memory for a ROS message of type MessageT
Expand Down Expand Up @@ -215,9 +216,9 @@ class Publisher : public PublisherBase
return this->do_serialized_publish(&serialized_msg);
}

/// Publish an instance of a LoanedMessage
/// Publish an instance of a LoanedMessage.
/**
* When publishing a loaned message, the memory for this ROS instance will be deallocated
* When publishing a loaned message, the memory for this ROS message will be deallocated
* after being published.
* The instance of the loaned message is no longer valid after this call.
*
Expand Down
1 change: 0 additions & 1 deletion rclcpp/include/rclcpp/subscription_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ class SubscriptionBase : public std::enable_shared_from_this<SubscriptionBase>
void
handle_message(std::shared_ptr<void> & message, const rmw_message_info_t & message_info) = 0;

// TODO(karsten1987): Does it make sense to pass in a weak_ptr?
RCLCPP_PUBLIC
virtual
void
Expand Down