Hi,
I found that there is no 'delete' corresponding to the 'new Channel', and this will prevent the dtor of TcpConnection from being called (for there is a tied object in the class Channel).
I have added a delete statement in function 'TcpConnection::connectDestroyed' because it is the last function called before the dtor of TcpConnection. And we can't add the delete statement in the dtor of TcpConnection because it won't be called (reason in the above).
Hope that's helpful.
Hi, I found that there is no 'delete' corresponding to the 'new Channel', and this will prevent the dtor of TcpConnection from being called (for there is a tied object in the class Channel). I have added a delete statement in function 'TcpConnection::connectDestroyed' because it is the last function called before the dtor of TcpConnection. And we can't add the delete statement in the dtor of TcpConnection because it won't be called (reason in the above). Hope that's helpful.