首页 > 其他 > 详细

non-fragile:oc2.0特性

时间:2019-01-16 12:52:57      阅读:158      评论:0      收藏:0      [点我收藏+]

Runtime Versions and Platforms

There are different versions of the Objective-C runtime on different platforms.

Legacy and Modern Versions

There are two versions of the Objective-C runtime—“modern” and “legacy”. The modern version was introduced with Objective-C 2.0 and includes a number of new features. The programming interface for the legacy version of the runtime is described in Objective-C 1 Runtime Reference; the programming interface for the modern version of the runtime is described in Objective-C Runtime Reference.

The most notable new feature is that instance variables in the modern runtime are “non-fragile”: 

  • In the legacy runtime, if you change the layout of instance variables in a class, you must recompile classes that inherit from it.

  • In the modern runtime, if you change the layout of instance variables in a class, you do not have to recompile classes that inherit from it.

In addition, the modern runtime supports instance variable synthesis for declared properties (see Declared Properties in The Objective-C Programming Language).

 

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html#//apple_ref/doc/uid/TP40008048-CH106-SW1

non-fragile:oc2.0特性

原文:https://www.cnblogs.com/feng9exe/p/10276306.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!