读 RunTime

作者: de7e01056dd4 | 来源:发表于2017-08-25 17:57 被阅读3次
Legacy and Modern Versions
 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;
  • 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.
1. Objective-C Source Code
 When you compile code containing Objective-C classes and methods, 
 the compiler creates the data structures and function calls that implement the dynamic characteristics of the language ,
 The data structures capture information found in class and category definitions and in protocol declarations;
 they include the class and protocol objects discussed in Defining a Class and Protocols in *The Objective-C Programming Language*, as well as method selectors, instance variable templates, and other information distilled from source code.
 The principal runtime function is the one that sends messages,

参考链接

Objective-C Runtime Programming Guide
Objective-C Runtime 运行时之一:类与对象
iOS安全

相关文章

网友评论

    本文标题:读 RunTime

    本文链接:https://www.haomeiwen.com/subject/nlcpdxtx.html