Skip to content

Commit

Permalink
Destroy msg extracted from LoanedMessage.
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Lihui <Lihui.Chen@sony.com>
  • Loading branch information
Chen Lihui authored and Chen Lihui committed Sep 11, 2020
1 parent d66cd96 commit bc22d8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rclcpp/test/rclcpp/test_loaned_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,7 @@ TEST_F(TestLoanedMessage, release) {

ASSERT_EQ(42.0f, msg->float64_value);

msg->~MessageT();
pub->get_allocator()->deallocate(msg, 1);
SUCCEED();
}

0 comments on commit bc22d8e

Please sign in to comment.