News for hackers. Stuff that matters.
Re:Singleton Is a Bad Idea by addsubtract on Sunday April 10, 2022 @02:40PM (#30980265)
I’ve seen singleton mis-implemented as well. For example, multithreaded implementations that can actually can make multiple instances depending on timing due to the constructor/initialization not being thread-safe.
Re:Singleton Is a Bad Idea by emodendroket on Sunday April 10, 2022 @02:48PM (#30980366)
That's a problem but more languages are introducing features to their STL that make it pretty much idiot-proof.