Why is self allowed in static context in objective c

前端 未结 3 1549
清歌不尽
清歌不尽 2020-12-02 16:45

Why is using self allowed in static context in Objective-C?

I thought it was allowed and then I encountered memory errors that took me a week to find ou

3条回答
  •  暖寄归人
    2020-12-02 17:28

    It's allowed because self does refer to the class object when used in class methods. Is that what you mean by "static context?" If so, what memory errors were you having that suggested otherwise?

提交回复
热议问题