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 -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -