From 3c40fa27823e70215261d3845275360f85e59623 Mon Sep 17 00:00:00 2001 From: saturneric Date: Fri, 5 Jan 2024 16:11:24 +0800 Subject: fix: slove some known issues --- src/core/function/basic/ChannelObject.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/function/basic/ChannelObject.cpp') 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 +#include 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; } -- cgit v1.2.3