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

NodeImpl重构 #460

Open
saz97 opened this issue Jun 27, 2024 · 0 comments
Open

NodeImpl重构 #460

saz97 opened this issue Jun 27, 2024 · 0 comments

Comments

@saz97
Copy link

saz97 commented Jun 27, 2024

NodeImpl 类通过继承 butil::RefCountedThreadSafe ,将析构函数设为私有,从而确保对象的生命周期由线程安全的引用计数机制(RefCountedThreadSafe)自动管理。
而RefCountedThreadSafe的机制非常类似于智能指针,为什么不使用智能指针重构NodeImpl呢

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

No branches or pull requests

1 participant