Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve the problem that the bound object has been destroyed during callback for TcpClient #489

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

1 participant