My colleagues say that I am infected from “Singletonitis”. It is an addiction to Singleton pattern.
Singleton pattern allows only a single instance of a class with a global access. Now my addiction is not on its over use in code, but because of lot of preaching to my team mates about singletons…
It may not always be necessary to have singletons if the class in question has insignificant memory, rather stick passing the object as the reference (argument) to the functions in such cases. Prefer singletons in places where the object memory size is significant.





