We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请问一下在Application里面有一个 public static synchronized App getInstance() { return instance; } 方法,为什么这里要用synchronized 关键字修饰
The text was updated successfully, but these errors were encountered:
@est7 Hello,单例模式的一种写法,为了线程安全
Sorry, something went wrong.
谢谢我在补一下
No branches or pull requests
请问一下在Application里面有一个
public static synchronized App getInstance() {
return instance;
}
方法,为什么这里要用synchronized 关键字修饰
The text was updated successfully, but these errors were encountered: