From 6adfb917a9ddf44e240c44955accd60c68ec3802 Mon Sep 17 00:00:00 2001 From: Jackie Kay Date: Mon, 25 Apr 2016 16:31:03 -0700 Subject: [PATCH] Virtual destructors (#212) --- rclcpp/include/rclcpp/client.hpp | 2 +- rclcpp/include/rclcpp/node.hpp | 2 +- rclcpp/include/rclcpp/publisher.hpp | 2 +- rclcpp/include/rclcpp/service.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rclcpp/include/rclcpp/client.hpp b/rclcpp/include/rclcpp/client.hpp index 02372a9da7..13332e94bd 100644 --- a/rclcpp/include/rclcpp/client.hpp +++ b/rclcpp/include/rclcpp/client.hpp @@ -51,7 +51,7 @@ class ClientBase const std::string & service_name); RCLCPP_PUBLIC - ~ClientBase(); + virtual ~ClientBase(); RCLCPP_PUBLIC const std::string & diff --git a/rclcpp/include/rclcpp/node.hpp b/rclcpp/include/rclcpp/node.hpp index 987c333c2a..988fbaa5e5 100644 --- a/rclcpp/include/rclcpp/node.hpp +++ b/rclcpp/include/rclcpp/node.hpp @@ -80,7 +80,7 @@ class Node bool use_intra_process_comms = false); RCLCPP_PUBLIC - ~Node(); + virtual ~Node(); /// Get the name of the node. // \return The name of the node. diff --git a/rclcpp/include/rclcpp/publisher.hpp b/rclcpp/include/rclcpp/publisher.hpp index bc506350a7..1a12ec7b0e 100644 --- a/rclcpp/include/rclcpp/publisher.hpp +++ b/rclcpp/include/rclcpp/publisher.hpp @@ -67,7 +67,7 @@ class PublisherBase size_t queue_size); RCLCPP_PUBLIC - ~PublisherBase(); + virtual ~PublisherBase(); /// Get the topic that this publisher publishes on. // \return The topic name. diff --git a/rclcpp/include/rclcpp/service.hpp b/rclcpp/include/rclcpp/service.hpp index 19ae8f3e6e..6353c7e426 100644 --- a/rclcpp/include/rclcpp/service.hpp +++ b/rclcpp/include/rclcpp/service.hpp @@ -47,7 +47,7 @@ class ServiceBase const std::string service_name); RCLCPP_PUBLIC - ~ServiceBase(); + virtual ~ServiceBase(); RCLCPP_PUBLIC std::string