Timeline for Singleton with a volatile and synchronized instance
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 17, 2017 at 14:34 | vote | accept | Eloise | ||
Nov 17, 2017 at 14:24 | comment | added | Vogel612 |
neither... make it a static final. You're just opening yourself up to critique and subtle multithreading bugs using actual singletons. In the vast majority of cases, Singleton is just a fancy word for "Global Single Instance", which is exactly what final static guarantees in the first place.
|
|
Nov 17, 2017 at 12:13 | history | edited | 200_success | CC BY-SA 3.0 |
deleted 135 characters in body; edited tags; edited title
|
Nov 17, 2017 at 11:07 | answer | added | ratchet freak | timeline score: 1 | |
Nov 17, 2017 at 10:52 | review | First posts | |||
Nov 17, 2017 at 11:57 | |||||
Nov 17, 2017 at 10:50 | history | asked | Eloise | CC BY-SA 3.0 |