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

Fix singleton classes #100

Merged
merged 2 commits into from
Apr 11, 2022
Merged

Fix singleton classes #100

merged 2 commits into from
Apr 11, 2022

Conversation

ShenMian
Copy link
Contributor

修正单例类的实现方式, 确保只会存在一个实例.
值得注意的是因为这些类全部没用使用 final 修饰, 所以我假设都可能被继承. 构造函数的访问限定符为 protected, 如果不会被继承的话最好使用 final 修饰并把构造函数的访问限定符改为 private.

修正单例类的实现方式, 确保只会存在一个实例.
@hyv1001 hyv1001 merged commit 73d9029 into BoomingTech:main Apr 11, 2022
@ShenMian ShenMian deleted the ShenMian-patch-2 branch April 11, 2022 11:40
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.

2 participants