points by Sohcahtoa82 2 days ago | 0 comments
> There's no way to create a class that prevents callers from reading the object before the constructor runs (in multi-threaded software, new first hands a reference to the caller, which can put it on the heap, then it calls the constructor)
Which is why the pattern of double-checked locking doesn't work.
[–] cowlevel 2 days ago
[–] hedora 1 day ago
That's pretty lame though.
[–] cowlevel 1 day ago