iphone - Consequences of Singletons -


so delved singleton classes , yes, find them quite helpful. use singletons data storage multiple targets (views, tables etc.). being said, can see myself going implement lot of singletons in project.

but can lot of singletons have negative impact? i've read singletons create 1 instance each of them in proces. other class instances released (assuming released properly) memory, should singletons released too?

so narrow down 1 question: harmful have lot of singletons?

singletons don't scale. no matter think should singleton, when system gets bigger, turns out needed more one.

if never need more one, singleton fine. however, systems scale, typically need more 1 of anything within own context.

singletons merely way "global". it's not bad, generally, it's not idea systems evolve , grow in complexity.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -