chenshuo / muduo

Event-driven network library for multi-threaded Linux server in C++11
https://github.com/chenshuo/muduo
Other
14.7k stars 5.15k forks source link

bugfix: Channel memory leak #520

Closed alanskind closed 3 years ago

alanskind commented 3 years ago

There is no 'delete' corresponding to the 'new Channel'.

chenshuo commented 3 years ago

delete channel_;

Does this ever compile?

TcpConnection::channel_ is of type std::unique_ptr<Channel>.

alanskind commented 3 years ago

I'm so sorry!!!