Objective-C variable… pointing to itself?

前端 未结 2 499
半阙折子戏
半阙折子戏 2021-02-04 05:12

I spotted this construct in some of Apple\'s example code for dealing with key-value observing. When adding an observer, you can add a context (in the form of a void* variable)

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-04 06:05

    I think that the most accurate description would be "a self-referential pointer".

提交回复
热议问题