From e5554a324862733d90c3ddf6eab1c78958acf5b7 Mon Sep 17 00:00:00 2001 From: "Sankara Narayanan Chandrasekar (RBEI/EMT2)" Date: Tue, 27 Apr 2021 17:23:15 +0530 Subject: [PATCH] iox-#337 remove the explicit call for the semaphore destructor within timer Signed-off-by: Sankara Narayanan Chandrasekar (RBEI/EMT2) --- iceoryx_utils/include/iceoryx_utils/cxx/timer.hpp | 2 +- iceoryx_utils/source/cxx/timer.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/iceoryx_utils/include/iceoryx_utils/cxx/timer.hpp b/iceoryx_utils/include/iceoryx_utils/cxx/timer.hpp index 114d38ac42..1e928f0e35 100644 --- a/iceoryx_utils/include/iceoryx_utils/cxx/timer.hpp +++ b/iceoryx_utils/include/iceoryx_utils/cxx/timer.hpp @@ -78,7 +78,7 @@ class Timer Timer(const iox::units::Duration interval, const iox::units::Duration delayThreshold = 0_ms) noexcept; /// @brief Stops and joins the thread spawned by the constructor. - ~Timer() noexcept; + virtual ~Timer() noexcept = default; /// @brief (re-)Starts the timer. This also calculates the time until the timer goes to sleep and next time of /// activation. This also acquires the binary semaphore. diff --git a/iceoryx_utils/source/cxx/timer.cpp b/iceoryx_utils/source/cxx/timer.cpp index 18ea54f2d9..5b6d1b9257 100644 --- a/iceoryx_utils/source/cxx/timer.cpp +++ b/iceoryx_utils/source/cxx/timer.cpp @@ -27,11 +27,6 @@ Timer::Timer(const iox::units::Duration interval, const iox::units::Duration del start(); } -Timer::~Timer() noexcept -{ - m_waitSemaphore.~Semaphore(); -} - void Timer::start() noexcept { stop();