Singleton objective c clarification

前端 未结 5 911
青春惊慌失措
青春惊慌失措 2020-12-12 02:18

as I continue my studies the book implemented a singleton. I understood the reason why use it but I just wanted some clarification regarding the code.

+ (BN         


        
5条回答
  •  Happy的楠姐
    2020-12-12 02:46

    Static variables are initialized just the one time when the function/method is first called. After that, you can basically pretend the line doesn't exist.

提交回复
热议问题