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

单例模式singleton #32

Open
gerrywp opened this issue Jul 1, 2024 · 1 comment
Open

单例模式singleton #32

gerrywp opened this issue Jul 1, 2024 · 1 comment

Comments

@gerrywp
Copy link

gerrywp commented Jul 1, 2024

看见写得单例模式中用到了接口(导出的)
注释的是:避免返回一个包私有类型的指针
请教下,返回一个私有类型的指针有什么影响吗,暂时想不出返回私有类型的指针有什么不妥?包本身就是封装并隔离的。

@wulie
Copy link

wulie commented Jul 1, 2024 via email

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

2 participants