CSerialPort icon indicating copy to clipboard operation
CSerialPort copied to clipboard

Detected memory leaks! - from signal3::connct

Open busyyang opened this issue 3 years ago • 1 comments
trafficstars

描述bug 使用CSerialPort_win_3.0.3/Demo/Comm,在关闭窗口退出的时候出现Detected memory leaks!的问题:

Detected memory leaks!
Dumping objects ->
{497} normal block at 0x00FD6270, 16 bytes long.
 Data: <x       &       > 78 A7 D7 00 C8 FA CF 00 26 C6 D3 00 00 00 00 00 
Object dump complete.
程序“[17556] Comm.exe”已退出,返回值为 2 (0x2)。

通过Debug定位到sigslot.h中的signal3::connect中_connection3<desttype, arg1_type, arg2_type, arg3_type, mt_policy>* conn = new _connection3<desttype, arg1_type, arg2_type, arg3_type, mt_policy>(pclass, pmemfun);未释放内存。

重现步骤 打开Demo调试运行,关闭后可在输出窗口中发现内存泄漏信息。

运行环境信息:

  • 操作系统: win10x64
  • 编译器: VS2015
  • 版本号CSerialPort 3.0.3.180621

busyyang avatar Dec 16 '21 07:12 busyyang

感谢反馈 如果着急建议使用4.X版本

itas109 avatar Dec 21 '21 13:12 itas109