make all destructors virtual
This commit is contained in:
parent
16323b3f92
commit
9df50f5355
7 changed files with 8 additions and 8 deletions
|
@ -54,7 +54,7 @@ public:
|
||||||
: node_handle_(node_handle), client_handle_(client_handle), service_name_(service_name)
|
: node_handle_(node_handle), client_handle_(client_handle), service_name_(service_name)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
~ClientBase()
|
virtual ~ClientBase()
|
||||||
{
|
{
|
||||||
if (client_handle_) {
|
if (client_handle_) {
|
||||||
if (rmw_destroy_client(client_handle_) != RMW_RET_OK) {
|
if (rmw_destroy_client(client_handle_) != RMW_RET_OK) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~MultiThreadedExecutor() {}
|
virtual ~MultiThreadedExecutor() {}
|
||||||
|
|
||||||
void
|
void
|
||||||
spin()
|
spin()
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
|
|
||||||
SingleThreadedExecutor() {}
|
SingleThreadedExecutor() {}
|
||||||
|
|
||||||
~SingleThreadedExecutor() {}
|
virtual ~SingleThreadedExecutor() {}
|
||||||
|
|
||||||
void spin()
|
void spin()
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
: node_handle_(node_handle), publisher_handle_(publisher_handle)
|
: node_handle_(node_handle), publisher_handle_(publisher_handle)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
~Publisher()
|
virtual ~Publisher()
|
||||||
{
|
{
|
||||||
if (publisher_handle_) {
|
if (publisher_handle_) {
|
||||||
if (rmw_destroy_publisher(node_handle_.get(), publisher_handle_) != RMW_RET_OK) {
|
if (rmw_destroy_publisher(node_handle_.get(), publisher_handle_) != RMW_RET_OK) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
: node_handle_(node_handle), service_handle_(service_handle), service_name_(service_name)
|
: node_handle_(node_handle), service_handle_(service_handle), service_name_(service_name)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
~ServiceBase()
|
virtual ~ServiceBase()
|
||||||
{
|
{
|
||||||
if (service_handle_) {
|
if (service_handle_) {
|
||||||
if (rmw_destroy_service(service_handle_) != RMW_RET_OK) {
|
if (rmw_destroy_service(service_handle_) != RMW_RET_OK) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
(void)ignore_local_publications_;
|
(void)ignore_local_publications_;
|
||||||
}
|
}
|
||||||
|
|
||||||
~SubscriptionBase()
|
virtual ~SubscriptionBase()
|
||||||
{
|
{
|
||||||
if (subscription_handle_) {
|
if (subscription_handle_) {
|
||||||
if (rmw_destroy_subscription(node_handle_.get(), subscription_handle_) != RMW_RET_OK) {
|
if (rmw_destroy_subscription(node_handle_.get(), subscription_handle_) != RMW_RET_OK) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~TimerBase()
|
virtual ~TimerBase()
|
||||||
{
|
{
|
||||||
if (guard_condition_) {
|
if (guard_condition_) {
|
||||||
if (rmw_destroy_guard_condition(guard_condition_) != RMW_RET_OK) {
|
if (rmw_destroy_guard_condition(guard_condition_) != RMW_RET_OK) {
|
||||||
|
@ -107,7 +107,7 @@ public:
|
||||||
thread_ = std::thread(&GenericTimer<Clock>::run, this);
|
thread_ = std::thread(&GenericTimer<Clock>::run, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~GenericTimer()
|
virtual ~GenericTimer()
|
||||||
{
|
{
|
||||||
cancel();
|
cancel();
|
||||||
thread_.join();
|
thread_.join();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue