【发布时间】:2011-10-05 19:02:49
【问题描述】:
我正在使用 Objective-C 属性为我处理保留/释放实例变量。在我的课堂上,我正在做这样的事情:
self.myProperty = somethingIWantToRetain
[self.myProperty doSomeAction]
[self.myProperty doSomethingElse]
使用 [self myProperty] / self.myProperty 是否比在我不更改 myProperty 值的行中简单地使用 myProperty 慢?例如,以下会更快吗?
self.myProperty = somethingIWantToRetain
[myProperty doSomeAction]
[myProperty doSomethingElse]
谢谢
【问题讨论】:
标签: iphone objective-c properties