itas109 / CSerialPort

CSerialPort - lightweight cross-platform serial port library for C++/C/C#/Java/Python/Node.js/Electron
https://blog.csdn.net/itas109/article/details/84282860
Other
710 stars 337 forks source link

function writeData hanle leak on windows 函数writeData 在windows上存在写入句柄泄露 #49

Closed itas109 closed 3 years ago

itas109 commented 3 years ago

Describe the bug function writeData hanle leak on windows
函数writeData 在windows上存在写入句柄泄露

To Reproduce open taskmgr.exe -> details -> handle call function writeData once, the process's handle +1 on taskmgr 打开任务管理器 -> 详细信息 -> 句柄 调用一次writeData 函数,任务管理器中进程对应的句柄数会+1

Expected behavior call function writeData once, the process's handle +1,and then -1 when write finished。 调用writeData 函数,进程句柄数+1,写入完成后句柄数 -1

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):