From f5cf83e4b3fdf1e9ae82b00f39e45e189809c419 Mon Sep 17 00:00:00 2001 From: saturneric Date: Fri, 15 Dec 2023 17:04:59 +0800 Subject: fix: slove some issues on memory and intilizations --- src/core/function/basic/ChannelObject.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (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 7a41d4d1..3f040ca6 100644 --- a/src/core/function/basic/ChannelObject.cpp +++ b/src/core/function/basic/ChannelObject.cpp @@ -28,13 +28,20 @@ #include "ChannelObject.h" +#include +#include +#include + namespace GpgFrontend { ChannelObject::ChannelObject() noexcept = default; -ChannelObject::ChannelObject(int channel) : channel_(channel) {} +ChannelObject::ChannelObject(int channel, std::string type) + : channel_(channel), type_(std::move(type)) {} -ChannelObject::~ChannelObject() noexcept = default; +ChannelObject::~ChannelObject() noexcept { + std::cout << "deleting channel object: " << type_ << std::endl; +} void ChannelObject::SetChannel(int channel) { this->channel_ = channel; } -- cgit v1.2.3