aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/basic/ChannelObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/function/basic/ChannelObject.cpp')
-rw-r--r--src/core/function/basic/ChannelObject.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/function/basic/ChannelObject.cpp b/src/core/function/basic/ChannelObject.cpp
index 451f9eeb..ddbfa603 100644
--- a/src/core/function/basic/ChannelObject.cpp
+++ b/src/core/function/basic/ChannelObject.cpp
@@ -28,7 +28,7 @@
#include "ChannelObject.h"
-#include <utility>
+#include <iostream>
namespace GpgFrontend {
@@ -37,7 +37,15 @@ ChannelObject::ChannelObject() noexcept = default;
ChannelObject::ChannelObject(int channel, std::string type)
: channel_(channel), type_(std::move(type)) {}
+#ifdef DEBUG
+ChannelObject::~ChannelObject() noexcept {
+ // using iostream instead of spdlog bacause at this time spdlog may have
+ // already been destroyed.
+ std::cout << "releasing channel object: " << this->type_ << std::endl;
+}
+#else
ChannelObject::~ChannelObject() noexcept = default;
+#endif
void ChannelObject::SetChannel(int channel) { this->channel_ = channel; }