سؤال

Does anything in Objective-C use associative references under the hood? 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.

نصائح أخرى

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top