
26 Jan
2010
26 Jan
'10
10:02 p.m.
Frank Mori Hess wrote:
If you peel off the singleton aspect of singletons, you're left with global state and lazy initialization. A facility that supports thread-safe lazy initialization might be useful, but why tie it to global state (which is of more dubious value)?
Hm, good point. Perhaps there are three "levels" here: 1) Thread-safe, lazy initialized, general creation methods 2) 1 with global access 3) 2 with guaranteed same-instance access.