-
Notifications
You must be signed in to change notification settings - Fork 287
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
Overcomplicated singleton #10
Comments
The alternatives that can be used in place of the above mentioned double-check synchronized lock |
This is wrong because classes are loaded lazily, according to JVM spec. |
@Miha-x64 what spec do you reference exactly? |
design-patterns-java/src/refactoring_guru/singleton/example/thread_safe/Singleton.java
Lines 43 to 52 in 7601425
Why do you prefer this overcomplicated code instead of concise, simple, thread-safe, and lazy enough
?
The text was updated successfully, but these errors were encountered: