top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Why Singleton is Anti pattern?

+3 votes
154 views
Why Singleton is Anti pattern?
posted May 21, 2015 by Karthick.c

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

With more and more classes calling getInstance() the code gets more and more tightly coupled, monolithic, not testable and hard to change and hard to reuse because of not configurable, hidden dependencies. Also, there would be no need for this clumsy double checked locking if you call getInstance less often (i.e. once).

answer May 27, 2015 by Manikandan J
...