Function ros2_medkit_serialization::destroy_ros_message
Defined in File message_cleanup.hpp
Function Documentation
-
void ros2_medkit_serialization::destroy_ros_message(RosMessage_Cpp *ros_msg)
Destroy a dynamically allocated ROS message created by JsonSerializer::from_json()
This function properly cleans up messages allocated via the serialization library. It calls the message’s finalization function and deallocates the memory.
- Parameters:
ros_msg – Pointer to the RosMessage_Cpp structure to destroy. If nullptr or if ros_msg->data is nullptr, this is a no-op.