[英]Does anything in Objective-C use associative references under the hood?
Does anything in Objective-C use associative references under the hood? Objective-C中的任何内容都在幕后使用关联引用吗? For example, do property setter and getter use it behind the scene?
例如,属性设置器和获取器在后台使用它吗?
No. That would be much too slow. 不,那太慢了。
Some classes in Cocoa use them, but nothing in ObjC itself. 可可中的某些类使用它们,但ObjC本身中不使用任何类。
I would think associative references would be used explicitly by developers extending exiting classes. 我认为关联引用将由扩展现有类的开发人员显式使用。 When the compiler generates getters and setters it has access to the source code.
编译器生成getter和setter时,可以访问源代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.