...
The double-checked locking idiom is frequently used to implement a Singleton Factory singleton factory pattern that performs lazy initialization. Lazy initialization defers the construction of a member field or an object referred to by a member field until an instance is actually required rather than computing the field value or constructing the referenced object in the class's constructor. Lazy initialization helps to break harmful circularities in class and instance initialization . It also enables other optimizations [Bloch 2005].
...
[API 2006] |
|
Item 48. Synchronize access to shared mutable data | |
Item 71. Use lazy initialization judiciously | |
[JLS 2005] | §12.4, Initialization of Classes and Interfaces |
| |
Manson, Jeremy, Lazy Initialization for Performance | |
[Shipilёv 2014] | Shipilёv, Aleksey, Safe Publication and Safe Initialization in Java |
...