Skip to content

Commit

Permalink
Call fini to avoid memory leak
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 14, 2020
1 parent cbf3359 commit 06712f7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ TEST_F(TestStaticExecutorEntitiesCollector, add_remove_basic_node) {

// Still one for the executor
EXPECT_EQ(1u, entities_collector_->get_number_of_waitables());
entities_collector_->fini();
}

TEST_F(TestStaticExecutorEntitiesCollector, add_remove_node_out_of_scope) {
Expand Down Expand Up @@ -213,6 +214,7 @@ TEST_F(TestStaticExecutorEntitiesCollector, add_remove_node_out_of_scope) {

// Still one for the executor
EXPECT_EQ(1u, entities_collector_->get_number_of_waitables());
entities_collector_->fini();
}

class TestWaitable : public rclcpp::Waitable
Expand Down Expand Up @@ -292,4 +294,5 @@ TEST_F(TestStaticExecutorEntitiesCollector, add_remove_node_with_entities) {
EXPECT_EQ(0u, entities_collector_->get_number_of_clients());
// Still one for the executor
EXPECT_EQ(1u, entities_collector_->get_number_of_waitables());
entities_collector_->fini();
}

0 comments on commit 06712f7

Please sign in to comment.