Singletonitis

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.

Subscribe / Share

Nitin tagged this post with: Design Patterns Read 175 articles by

Share

Liked By

Monthly Archive

Photos From Reflections

Alien Tweets...

Powered by Twitter Tools

free counters

thealienworld.com
74/100

I support…

Wikipedia Affiliate Button Wikipedia Affiliate Button
Performance Optimization WordPress Plugins by W3 EDGE