3 ms·
This is a failed attempt at a singleton pattern. The main problem here (there are MANY) is that there is no check to see if a Singleton already exists, meaning
by hnal943 16y ago
This is a failed attempt at a singleton pattern. The main problem here (there are MANY) is that there is no check to see if a Singleton already exists, meaning that the "Singleton" can be scrapped and replaced with a new object (most likely by accident) at any time.
This code does in fact suck unambiguously.