4 ms·
I thought I was very specific... "There are good uses for singleton classes in single threaded applications that don't use unit tests " In any case I didn't s
by pmelendez 14y ago
I thought I was very specific...
"There are good uses for singleton classes in single threaded applications that don't use unit tests "
In any case I didn't say that logging was the only use. In gaming, we had used it a lot when sharing single resources across all the game such a config file. And if you can take a peak to Unreal Engine you would see how those guys abuse of them without too many problem.
I do not want to be an advocate of using Singletons. I am aware of the risks and problems it brings with. But sometimes people forget that not every application is multithreaded nor implement unit tests.
My fear with that is when people forget why it was bad on first place (just like it happened with the goto keyword).