Skip to content

Conversation

@x724172556
Copy link

之前回复过大神,我现在有一些想法,关于TcpClient销毁,但是回调仍然依赖于这个对象或者子对象,我这里在回调部分,全都使用了智能指针,并且将Connector的构造函数隐藏,只能使用Connector::create来创造智能指针对象,避免使用者,在使用过程中,在栈中构造Connector,在我的工程代码环境中测试过,没有出现之前提到的由于对象销毁,回调时依赖于无效的指针的问题,大神可以看看,这样改行不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant