diff options
author | saturneric <[email protected]> | 2024-01-05 08:11:24 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-05 08:11:24 +0000 |
commit | 3c40fa27823e70215261d3845275360f85e59623 (patch) | |
tree | 7c39090027d8ad7fbe1662d7a73cc5748a2d5b52 /src/core/function/basic/ChannelObject.cpp | |
parent | feat: switch to portable mode by adding a txt file under bin path (diff) | |
download | GpgFrontend-3c40fa27823e70215261d3845275360f85e59623.tar.gz GpgFrontend-3c40fa27823e70215261d3845275360f85e59623.zip |
fix: slove some known issues
Diffstat (limited to 'src/core/function/basic/ChannelObject.cpp')
-rw-r--r-- | src/core/function/basic/ChannelObject.cpp | 10 |
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; } |