Skip to content

Commit ac4014d

Browse files
author
Chen Lihui
committed
remove unnecessary clear operation
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
1 parent 1806649 commit ac4014d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

rclcpp/test/rclcpp/test_memory_strategy.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ TEST_F(TestMemoryStrategy, get_subscription_by_handle) {
115115
nullptr,
116116
memory_strategy()->get_subscription_by_handle(subscription_handle, weak_groups_to_nodes));
117117
} // callback_group goes out of scope
118-
memory_strategy()->clear_handles();
119118
EXPECT_EQ(
120119
nullptr,
121120
memory_strategy()->get_subscription_by_handle(subscription_handle, weak_groups_to_nodes));
@@ -168,7 +167,6 @@ TEST_F(TestMemoryStrategy, get_service_by_handle) {
168167
nullptr,
169168
memory_strategy()->get_service_by_handle(service_handle, weak_groups_to_nodes));
170169
} // callback_group goes out of scope
171-
memory_strategy()->clear_handles();
172170
EXPECT_EQ(
173171
nullptr,
174172
memory_strategy()->get_service_by_handle(service_handle, weak_groups_to_nodes));
@@ -216,7 +214,6 @@ TEST_F(TestMemoryStrategy, get_client_by_handle) {
216214
nullptr,
217215
memory_strategy()->get_client_by_handle(client_handle, weak_groups_to_nodes));
218216
} // callback_group goes out of scope
219-
memory_strategy()->clear_handles();
220217
EXPECT_EQ(
221218
nullptr,
222219
memory_strategy()->get_client_by_handle(client_handle, weak_groups_to_nodes));
@@ -265,7 +262,6 @@ TEST_F(TestMemoryStrategy, get_timer_by_handle) {
265262
nullptr,
266263
memory_strategy()->get_timer_by_handle(timer_handle, weak_groups_to_nodes));
267264
} // callback_group goes out of scope
268-
memory_strategy()->clear_handles();
269265
EXPECT_EQ(
270266
nullptr,
271267
memory_strategy()->get_timer_by_handle(timer_handle, weak_groups_to_nodes));
@@ -360,7 +356,6 @@ TEST_F(TestMemoryStrategy, get_group_by_subscription) {
360356
callback_group,
361357
memory_strategy()->get_group_by_subscription(subscription, weak_groups_to_nodes));
362358
} // callback_group goes out of scope
363-
memory_strategy()->clear_handles();
364359
EXPECT_EQ(
365360
nullptr,
366361
memory_strategy()->get_group_by_subscription(subscription, weak_groups_to_nodes));
@@ -405,7 +400,6 @@ TEST_F(TestMemoryStrategy, get_group_by_service) {
405400
callback_group,
406401
memory_strategy()->get_group_by_service(service, weak_groups_to_nodes));
407402
} // callback_group goes out of scope
408-
memory_strategy()->clear_handles();
409403
EXPECT_EQ(
410404
nullptr,
411405
memory_strategy()->get_group_by_service(service, weak_groups_to_nodes));
@@ -445,7 +439,6 @@ TEST_F(TestMemoryStrategy, get_group_by_client) {
445439
callback_group,
446440
memory_strategy()->get_group_by_client(client, weak_groups_to_nodes));
447441
} // callback_group goes out of scope
448-
memory_strategy()->clear_handles();
449442
EXPECT_EQ(
450443
nullptr,
451444
memory_strategy()->get_group_by_client(client, weak_groups_to_nodes));
@@ -485,7 +478,6 @@ TEST_F(TestMemoryStrategy, get_group_by_timer) {
485478
callback_group,
486479
memory_strategy()->get_group_by_timer(timer, weak_groups_to_nodes));
487480
} // callback_group goes out of scope
488-
memory_strategy()->clear_handles();
489481
EXPECT_EQ(
490482
nullptr,
491483
memory_strategy()->get_group_by_timer(timer, weak_groups_to_nodes));
@@ -524,7 +516,6 @@ TEST_F(TestMemoryStrategy, get_group_by_waitable) {
524516
callback_group,
525517
memory_strategy()->get_group_by_waitable(waitable, weak_groups_to_nodes));
526518
} // callback_group goes out of scope
527-
memory_strategy()->clear_handles();
528519
EXPECT_EQ(
529520
nullptr,
530521
memory_strategy()->get_group_by_waitable(waitable, weak_groups_to_nodes));

0 commit comments

Comments
 (0)