What does having two asterisk ** in Objective-C mean?

后端 未结 5 1040
梦如初夏
梦如初夏 2020-12-03 02:08

I understand having one asterisk * is a pointer, what does having two ** mean?

I stumble upon this from the documentation:

- (NSAppleEventDescriptor          


        
5条回答
  •  清歌不尽
    2020-12-03 02:41

    (reference: more iOS 6 development)

    In Objective-C methods, arguments, including object pointers, are passed by value, which means that the called method gets its own copy of the pointer that was passed in. So if the called method wants to change the pointer, as opposed to the data the pointer points to, you need another level of indirection. Thus, the pointer to the pointer.

提交回复
热议问题