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 02372a9..13332e9 100644 --- a/rclcpp/include/rclcpp/client.hpp +++ b/rclcpp/include/rclcpp/client.hpp @@ -51,7 +51,7 @@ public: 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 987c333..988fbaa 100644 --- a/rclcpp/include/rclcpp/node.hpp +++ b/rclcpp/include/rclcpp/node.hpp @@ -80,7 +80,7 @@ public: 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 bc50635..1a12ec7 100644 --- a/rclcpp/include/rclcpp/publisher.hpp +++ b/rclcpp/include/rclcpp/publisher.hpp @@ -67,7 +67,7 @@ public: 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 19ae8f3..6353c7e 100644 --- a/rclcpp/include/rclcpp/service.hpp +++ b/rclcpp/include/rclcpp/service.hpp @@ -47,7 +47,7 @@ public: const std::string service_name); RCLCPP_PUBLIC - ~ServiceBase(); + virtual ~ServiceBase(); RCLCPP_PUBLIC std::string