Why does a declared property use both retain and readonly?

前端 未结 2 967
闹比i
闹比i 2021-01-31 09:56

I\'ve noticed that some of Apple\'s examples include both a retain and readonly modifier on properties. What\'s the point of including retain

2条回答
  •  感情败类
    2021-01-31 10:42

    You can include a second, private readwrite declaration in a class extension. The memory management scheme for all references needs to match IIRC, so you get silliness like "readonly, retain".

提交回复
热议问题