make all destructors virtual

This commit is contained in:
William Woodall 2015-07-01 17:51:15 -07:00
parent 16323b3f92
commit 9df50f5355
7 changed files with 8 additions and 8 deletions

View file

@ -54,7 +54,7 @@ public:
: node_handle_(node_handle), client_handle_(client_handle), service_name_(service_name)
{}
~ClientBase()
virtual ~ClientBase()
{
if (client_handle_) {
if (rmw_destroy_client(client_handle_) != RMW_RET_OK) {

View file

@ -48,7 +48,7 @@ public:
}
}
~MultiThreadedExecutor() {}
virtual ~MultiThreadedExecutor() {}
void
spin()

View file

@ -42,7 +42,7 @@ public:
SingleThreadedExecutor() {}
~SingleThreadedExecutor() {}
virtual ~SingleThreadedExecutor() {}
void spin()
{

View file

@ -45,7 +45,7 @@ public:
: node_handle_(node_handle), publisher_handle_(publisher_handle)
{}
~Publisher()
virtual ~Publisher()
{
if (publisher_handle_) {
if (rmw_destroy_publisher(node_handle_.get(), publisher_handle_) != RMW_RET_OK) {

View file

@ -53,7 +53,7 @@ public:
: node_handle_(node_handle), service_handle_(service_handle), service_name_(service_name)
{}
~ServiceBase()
virtual ~ServiceBase()
{
if (service_handle_) {
if (rmw_destroy_service(service_handle_) != RMW_RET_OK) {

View file

@ -59,7 +59,7 @@ public:
(void)ignore_local_publications_;
}
~SubscriptionBase()
virtual ~SubscriptionBase()
{
if (subscription_handle_) {
if (rmw_destroy_subscription(node_handle_.get(), subscription_handle_) != RMW_RET_OK) {

View file

@ -64,7 +64,7 @@ public:
}
}
~TimerBase()
virtual ~TimerBase()
{
if (guard_condition_) {
if (rmw_destroy_guard_condition(guard_condition_) != RMW_RET_OK) {
@ -107,7 +107,7 @@ public:
thread_ = std::thread(&GenericTimer<Clock>::run, this);
}
~GenericTimer()
virtual ~GenericTimer()
{
cancel();
thread_.join();