why we should do prevent to make singleton instances in ios, swift -


can please explain reason prevent instance in singleton.

i saw says below

private override init (){  } 

but works fine if or not.

i'm not sure mean question, if you're asking why initialiser private comes definition of singleton design pattern. initialiser needs private make sure nobody can crate instance of singleton.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -